config/roles/dev/tasks/haskell.yml

26 lines
761 B
YAML
Raw Normal View History

- name: Download ghcup bootstrap script
ansible.builtin.uri:
2025-08-09 11:47:58 +03:00
url: https://get-ghcup.haskell.org
return_content: true
register: ghcup_bootstrap
2025-08-09 11:47:58 +03:00
- name: Check if .ghcup present
ansible.builtin.stat:
path: '{{ ansible_env.HOME }}/.ghcup'
register: ghcup_dir
# TODO: detect fish install ??
- name: Install ghcup, stack, lsp server
2025-08-09 11:47:58 +03:00
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