config/roles/dev/tasks/haskell.yml

25 lines
764 B
YAML

- name: Download ghcup bootstrap script
ansible.builtin.uri:
url: https://get-ghcup.haskell.org
return_content: true
register: ghcup_bootstrap
- name: Check if .ghcup present
ansible.builtin.stat:
path: '{{ ansible_env.HOME }}/.ghcup'
register: ghcup_dir
# TODO: detect fish install ??
- name: Installing ghcup, stack, lsp server
ansible.builtin.shell: |
SHELL='/usr/bin/fish'
BOOTSTRAP_HASKELL_NONINTERACTIVE=1
BOOTSTRAP_HASKELL_GHC_VERSION=latest
BOOTSTRAP_HASKELL_CABAL_VERSION=latest
BOOTSTRAP_HASKELL_INSTALL_STACK=1
BOOTSTRAP_HASKELL_INSTALL_HLS=1
BOOTSTRAP_HASKELL_ADJUST_BASHRC=P
{{ ghcup_bootstrap.content }}
args:
executable: /bin/sh
changed_when: not ghcup_dir.stat.exists