zuul-jobs/roles/ensure-haskell-stack/tasks/main.yaml
Ian Wienand c5c9f7d862 Retire Fedora 31 for 32
We have Fedora 32 nodes now, retire the Fedora 31 testing and replace
with 32.

Docker isn't supported on Fedora 32.  There's a problem with cgroups
v2 and you can read all about it at [1].  Drop the install test.

Haskell upstream has dropped F32 from the COPR repo as it is now
packaged; a new package with the correct dependencies has been pushed
but isn't available yet (see the inline github issue), so workaround
the missing package.

[1] https://github.com/docker/for-linux/issues/955

Change-Id: I025613bee8c0a8513afa90331431d2c18b616464
2020-09-17 17:54:59 +10:00

34 lines
863 B
YAML

- name: Make sure the role is run on Fedora
fail:
msg: "This role supports Fedora only"
when: "ansible_distribution != 'Fedora'"
- name: Check stack version
command: stack --version
failed_when: false
register: _stack_version
- block:
# This package is somehow missing from the requirements of the
# published packaged copr repo. See
# https://github.com/commercialhaskell/stack/issues/5388
- name: Preinstall gmp-devel
package:
name: gmp-devel
state: present
become: true
- name: Install stack
package:
name: stack
state: present
become: true
- name: Upgrade stack
command: stack upgrade
become: true
- name: Setup stack LTS
command: "stack {% if lts_version %}--resolver {{ lts_version }}{% endif %} setup"
when: _stack_version.rc != 0