mirror of https://github.com/ceph/ceph-ansible.git
73 lines
2.7 KiB
YAML
73 lines
2.7 KiB
YAML
---
|
|
- 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.9!"
|
|
when:
|
|
- ansible_version.major|int == 2
|
|
- ansible_version.minor|int != 9
|
|
|
|
- name: fail on unsupported system
|
|
fail:
|
|
msg: "System not supported {{ ansible_facts['system'] }}"
|
|
when: ansible_facts['system'] not in ['Linux']
|
|
|
|
- name: fail on unsupported architecture
|
|
fail:
|
|
msg: "Architecture not supported {{ ansible_facts['architecture'] }}"
|
|
when: ansible_facts['architecture'] not in ['x86_64', 'ppc64le', 'armv7l', 'aarch64']
|
|
|
|
- name: fail on unsupported distribution
|
|
fail:
|
|
msg: "Distribution not supported {{ ansible_facts['os_family'] }}"
|
|
when: ansible_facts['os_family'] not in ['Debian', 'RedHat', 'ClearLinux', 'Suse']
|
|
|
|
- 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 (>= 8.1) or RHEL 7 (>= 7.7)"
|
|
when: (ansible_facts['distribution_major_version'] | int == 8 and ansible_facts['distribution_version'] is version('8.1', '<')) or
|
|
(ansible_facts['distribution_major_version'] | int == 7 and ansible_facts['distribution_version'] is version('7.7', '<'))
|
|
|
|
- name: subscription manager related tasks
|
|
when: ceph_repository_type == 'cdn'
|
|
block:
|
|
- name: determine if node is registered with subscription-manager
|
|
command: subscription-manager identity
|
|
register: subscription
|
|
changed_when: false
|
|
failed_when: false
|
|
check_mode: no
|
|
|
|
- name: fail on unregistered red hat rhcs linux
|
|
fail:
|
|
msg: "You must register your machine with subscription-manager"
|
|
when: subscription.rc != 0
|
|
|
|
- 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 openSUSE distribution (only 15.x supported)"
|
|
fail:
|
|
msg: "Distribution not supported: {{ ansible_facts['distribution'] }}"
|
|
when:
|
|
- ansible_facts['distribution'] == 'openSUSE Leap'
|
|
- 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'
|