2020-05-07 23:56:02 +00:00
|
|
|
- name: Make sure the role is run on Fedora
|
|
|
|
fail:
|
|
|
|
msg: "This role supports Fedora only"
|
|
|
|
when: "ansible_distribution != 'Fedora'"
|
|
|
|
|
2020-04-21 21:27:27 +00:00
|
|
|
- name: Check cabal version
|
|
|
|
command: cabal --version
|
|
|
|
failed_when: false
|
|
|
|
register: _cabal_version
|
|
|
|
|
2022-07-26 20:15:16 +10:00
|
|
|
- name: Install cabal
|
2022-10-17 14:15:53 +11:00
|
|
|
when: _cabal_version.rc != 0
|
2022-07-26 20:15:16 +10:00
|
|
|
block:
|
2021-06-18 10:57:00 +10:00
|
|
|
- name: Ensure copr dnf plugin
|
|
|
|
package:
|
|
|
|
name: dnf-plugins-core
|
|
|
|
state: present
|
|
|
|
become: yes
|
|
|
|
|
2020-05-07 23:56:02 +00:00
|
|
|
- name: Install cabal copr
|
|
|
|
command: dnf copr enable -y petersen/cabal-install
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Install cabal
|
|
|
|
package:
|
|
|
|
name: cabal-install
|
|
|
|
state: present
|
|
|
|
become: true
|
2020-04-21 21:27:27 +00:00
|
|
|
|
|
|
|
- name: Check package
|
|
|
|
stat:
|
|
|
|
path: "~/.cabal/packages"
|
|
|
|
register: _cabal_packages
|
|
|
|
|
|
|
|
- name: Update package list
|
|
|
|
command: cabal update
|
|
|
|
when: not _cabal_packages.stat.exists
|