ceph-ansible/roles/ceph-validate/tasks/check_system.yml

64 lines
2.3 KiB
YAML
Raw Normal View History

---
- name: fail on unsupported ansible version (1.X)
fail:
msg: "Ansible version must be >= 2.x, please update!"
when: ansible_version.major|int < 2
- name: fail on unsupported ansible version
fail:
msg: "Ansible version must be 2.14!"
when: ansible_version.minor|int != 14
- name: fail on unsupported system
2015-09-04 00:18:53 +08:00
fail:
msg: "System not supported {{ ansible_facts['system'] }}"
when: ansible_facts['system'] not in ['Linux']
- name: fail on unsupported architecture
2015-09-04 00:18:53 +08:00
fail:
msg: "Architecture not supported {{ ansible_facts['architecture'] }}"
when: ansible_facts['architecture'] not in ['x86_64', 'ppc64le', 'armv7l', 'aarch64']
- name: fail on unsupported distribution
2015-09-04 00:18:53 +08:00
fail:
msg: "Distribution not supported {{ ansible_facts['os_family'] }}"
when: ansible_facts['os_family'] not in ['Debian', 'RedHat', 'ClearLinux', 'Suse']
- name: fail on unsupported CentOS release
fail:
msg: "CentOS release {{ ansible_facts['distribution_major_version'] }} not supported with dashboard"
when:
- ansible_facts['distribution'] == 'CentOS'
- ansible_facts['distribution_major_version'] | int == 7
- not containerized_deployment | bool
- dashboard_enabled | bool
- name: red hat based systems tasks
when:
- ceph_repository == 'rhcs'
- ansible_facts['distribution'] == 'RedHat'
block:
- name: fail on unsupported distribution for red hat ceph storage
fail:
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', '<')
- name: fail on unsupported distribution for ubuntu cloud archive
fail:
msg: "Distribution not supported by Ubuntu Cloud Archive: {{ ansible_facts['distribution'] }}"
when:
- ceph_repository == 'uca'
- ansible_facts['distribution'] != 'Ubuntu'
- name: "fail on unsupported SUSE/openSUSE distribution (only 15.x supported)"
fail:
msg: "Distribution not supported: {{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_major_version'] }}"
when:
- ansible_facts['distribution'] == 'openSUSE Leap' or ansible_facts['distribution'] == 'SUSE'
- ansible_facts['distribution_major_version'] != '15'
- name: fail if systemd is not present
fail:
msg: "Systemd must be present"
when: ansible_facts['service_mgr'] != 'systemd'