zuul-jobs/roles/enable-fips/tasks/main.yaml
Ade Lee c22e4c1cc3 Changes to make fips work on ubuntu
Change-Id: Ibda3e9369a177151ce222f87bbf05fc5a37a47d6
2023-02-23 11:50:37 +01:00

21 lines
855 B
YAML

---
- name: Make sure this role is run on RHEL/CentOS/Ubuntu systems
fail:
msg: This role supports RHEL/CentOS/Fedora/Ubuntu systems only
when:
- not (ansible_distribution == 'CentOS' and ansible_distribution_major_version|int >= 8)
- not (ansible_distribution == 'Red Hat Enterprise Linux' and ansible_distribution_major_version|int >= 8)
- not ansible_distribution == 'Fedora'
- not ansible_distribution == 'Ubuntu'
- name: Do tasks for RHEL/Centos systems
include_tasks: rhel.yaml
when: >
(ansible_distribution == 'CentOS' and ansible_distribution_major_version|int >= 8) or
(ansible_distribution == 'Red Hat Enterprise Linux' and ansible_distribution_major_version|int >= 8) or
ansible_distribution == 'Fedora'
- name: Do tasks for Ubuntu
include_tasks: ubuntu.yaml
when: ansible_distribution == 'Ubuntu'