c22e4c1cc3
Change-Id: Ibda3e9369a177151ce222f87bbf05fc5a37a47d6
21 lines
855 B
YAML
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'
|