2015-01-07 18:41:35 +08:00
|
|
|
---
|
2019-12-07 05:11:51 +08:00
|
|
|
- name: fail on unsupported ansible version (1.X)
|
|
|
|
fail:
|
2019-11-01 21:28:03 +08:00
|
|
|
msg: "Ansible version must be >= 2.x, please update!"
|
2019-12-07 05:11:51 +08:00
|
|
|
when: ansible_version.major|int < 2
|
|
|
|
|
|
|
|
- name: fail on unsupported ansible version
|
|
|
|
fail:
|
2020-03-24 22:48:58 +08:00
|
|
|
msg: "Ansible version must be 2.9!"
|
|
|
|
when: ansible_version.minor|int != 9
|
2019-12-07 05:11:51 +08:00
|
|
|
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: fail on unsupported system
|
2015-09-04 00:18:53 +08:00
|
|
|
fail:
|
2021-03-03 22:43:50 +08:00
|
|
|
msg: "System not supported {{ ansible_facts['system'] }}"
|
|
|
|
when: ansible_facts['system'] not in ['Linux']
|
2015-01-07 18:41:35 +08:00
|
|
|
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: fail on unsupported architecture
|
2015-09-04 00:18:53 +08:00
|
|
|
fail:
|
2021-03-03 22:43:50 +08:00
|
|
|
msg: "Architecture not supported {{ ansible_facts['architecture'] }}"
|
|
|
|
when: ansible_facts['architecture'] not in ['x86_64', 'ppc64le', 'armv7l', 'aarch64']
|
2015-01-07 18:41:35 +08:00
|
|
|
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: fail on unsupported distribution
|
2015-09-04 00:18:53 +08:00
|
|
|
fail:
|
2021-03-03 22:43:50 +08:00
|
|
|
msg: "Distribution not supported {{ ansible_facts['os_family'] }}"
|
|
|
|
when: ansible_facts['os_family'] not in ['Debian', 'RedHat', 'ClearLinux', 'Suse']
|
2015-07-01 21:58:38 +08:00
|
|
|
|
2020-01-11 00:25:54 +08:00
|
|
|
- name: fail on unsupported CentOS release
|
|
|
|
fail:
|
2021-03-03 22:43:50 +08:00
|
|
|
msg: "CentOS release {{ ansible_facts['distribution_major_version'] }} not supported with dashboard"
|
2020-01-11 00:25:54 +08:00
|
|
|
when:
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['distribution'] == 'CentOS'
|
|
|
|
- ansible_facts['distribution_major_version'] | int == 7
|
2020-04-03 03:58:11 +08:00
|
|
|
- not containerized_deployment | bool
|
2020-05-08 20:39:52 +08:00
|
|
|
- dashboard_enabled | bool
|
2020-01-11 00:25:54 +08:00
|
|
|
|
2018-09-07 20:45:43 +08:00
|
|
|
- name: red hat based systems tasks
|
2019-03-28 16:13:30 +08:00
|
|
|
when:
|
|
|
|
- ceph_repository == 'rhcs'
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['distribution'] == 'RedHat'
|
2018-09-07 20:45:43 +08:00
|
|
|
block:
|
|
|
|
- name: fail on unsupported distribution for red hat ceph storage
|
|
|
|
fail:
|
2021-03-03 22:43:50 +08:00
|
|
|
msg: "Distribution not supported {{ ansible_facts['distribution_version'] }} by Red Hat Ceph Storage, only RHEL >= 8.2"
|
|
|
|
when: ansible_facts['distribution_version'] is version('8.2', '<')
|
2015-11-20 22:17:24 +08:00
|
|
|
|
2016-05-03 00:25:52 +08:00
|
|
|
- name: fail on unsupported distribution for ubuntu cloud archive
|
|
|
|
fail:
|
2021-03-03 22:43:50 +08:00
|
|
|
msg: "Distribution not supported by Ubuntu Cloud Archive: {{ ansible_facts['distribution'] }}"
|
2016-05-03 00:25:52 +08:00
|
|
|
when:
|
2017-08-03 21:30:25 +08:00
|
|
|
- ceph_repository == 'uca'
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['distribution'] != 'Ubuntu'
|
2016-05-03 00:25:52 +08:00
|
|
|
|
2019-08-22 03:36:38 +08:00
|
|
|
- name: "fail on unsupported SUSE/openSUSE distribution (only 15.x supported)"
|
2017-10-12 21:55:20 +08:00
|
|
|
fail:
|
2021-03-03 22:43:50 +08:00
|
|
|
msg: "Distribution not supported: {{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_major_version'] }}"
|
2017-10-12 21:55:20 +08:00
|
|
|
when:
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['distribution'] == 'openSUSE Leap' or ansible_facts['distribution'] == 'SUSE'
|
|
|
|
- ansible_facts['distribution_major_version'] != '15'
|
2017-10-12 21:55:20 +08:00
|
|
|
|
2017-01-20 17:14:35 +08:00
|
|
|
- name: fail if systemd is not present
|
|
|
|
fail:
|
|
|
|
msg: "Systemd must be present"
|
2021-03-03 22:43:50 +08:00
|
|
|
when: ansible_facts['service_mgr'] != 'systemd'
|