7fdf0cc3ab
This change adds support for custom target and removes the configure step which is not necessary. This change also uses the copr of cabal-install to get a more up-to-date version. Change-Id: I538e2b24abb66181d1ead2779bf6aa3440ee58ff
31 lines
683 B
YAML
31 lines
683 B
YAML
- name: Make sure the role is run on Fedora
|
|
fail:
|
|
msg: "This role supports Fedora only"
|
|
when: "ansible_distribution != 'Fedora'"
|
|
|
|
- name: Check cabal version
|
|
command: cabal --version
|
|
failed_when: false
|
|
register: _cabal_version
|
|
|
|
- block:
|
|
- 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
|
|
when: _cabal_version.rc != 0
|
|
|
|
- name: Check package
|
|
stat:
|
|
path: "~/.cabal/packages"
|
|
register: _cabal_packages
|
|
|
|
- name: Update package list
|
|
command: cabal update
|
|
when: not _cabal_packages.stat.exists
|