Skip to content
Snippets Groups Projects
Commit 880ef4d7 authored by Vladimír Štill's avatar Vladimír Štill
Browse files

ansible: Add hsExprTest role

parent 5dad5fb4
No related branches found
No related tags found
No related merge requests found
---
cabal_bin: "cabal"
---
- block:
- name: "Cabal update"
command: "{{cabal_bin}} v2-update --with-ghc=ghc-{{ghc_version}}"
- name: Remove stale GHC environments
file:
path: "/tmp/env.{{config.user}}"
state: absent
- name: Hackage modules
command: "{{cabal_bin}} v2-install --with-ghc=ghc-{{ghc_version}} --lib --package-env=/tmp/env.{{config.user}} {{item}}"
loop: "{{pkgs}}"
- name: Hackage extra modules
command: "{{cabal_bin}} v2-install --with-ghc=ghc-{{ghc_version}} --lib --package-env=/tmp/env.{{config.user}} {{item}}"
loop: "{{config.extra_pkgs}}"
when: config.extra_pkgs is defined
- name: hsExprTest checkout
git:
dest: '~/hsExprTest'
repo: https://github.com/vlstill/hsExprTest.git
update: true
- name: Install hsExprTest
command:
chdir: '~/hsExprTest'
cmd: "{{cabal_bin}} v2-install --with-ghc=ghc-{{ghc_version}} --lib --package-env=/tmp/env.{{config.user}}"
- name: Create GHC environment dir
file:
state: directory
path: "~/.local/share/ghc/x86_64-linux-{{ghc_version}}/environments"
- name: Deploy modified GHC environment
command: "mv /tmp/env.{{config.user}} ~/.local/share/ghc/x86_64-linux-{{ghc_version}}/environments/default"
become: true
become_user: "{{config.user}}"
---
- include_tasks: install.yml
loop: "{{configs}}"
loop_control:
loop_var: config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment