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

95 lines
3.0 KiB
YAML
Raw Normal View History

---
- name: fail on unsupported system
2015-09-04 00:18:53 +08:00
fail:
msg: "System not supported {{ ansible_system }}"
when:
- ansible_system not in ['Linux']
- name: fail on unsupported architecture
2015-09-04 00:18:53 +08:00
fail:
msg: "Architecture not supported {{ ansible_architecture }}"
when:
- ansible_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_os_family }}"
when:
- ansible_os_family not in ['Debian', 'RedHat', 'ClearLinux', 'Suse']
- name: fail on unsupported distribution for red hat ceph storage
2015-09-04 00:18:53 +08:00
fail:
msg: "Distribution not supported {{ ansible_distribution_version }} by Red Hat Ceph Storage, only RHEL >= 7.3"
when:
- ansible_distribution == 'Red Hat Enterprise Linux'
- ceph_repository == 'rhcs'
- ansible_distribution_version | version_compare('7.3', '<')
- name: determine if node is registered with subscription-manager
command: subscription-manager identity
register: subscription
changed_when: false
failed_when: false
check_mode: no
when:
- ansible_distribution == 'Red Hat Enterprise Linux'
- ceph_repository == 'rhcs'
- ceph_repository_type == 'cdn'
- name: fail on unregistered red hat rhcs linux
fail:
msg: "You must register your machine with subscription-manager"
when:
- ansible_distribution == 'Red Hat Enterprise Linux'
- ceph_repository == 'rhcs'
- ceph_repository_type == 'cdn'
- subscription.rc != '0'
- name: fail on unsupported distribution for ubuntu cloud archive
fail:
msg: "Distribution not supported by Ubuntu Cloud Archive: {{ ansible_distribution }}"
when:
- ceph_repository == 'uca'
- ansible_distribution != 'Ubuntu'
- name: fail on unsupported openSUSE distribution
fail:
msg: "Distribution not supported: {{ ansible_distribution }}"
when:
- ansible_distribution == 'openSUSE Leap'
- ansible_distribution_version | version_compare('42.3', '<')
- name: fail on unsupported ansible version
fail:
msg: "Ansible version must be >= 2.3.x, please update!"
when:
- ansible_version.major|int < 2
- name: fail on unsupported ansible version
fail:
msg: "Ansible version must be >= 2.3.x, please update!"
when:
- ansible_version.major|int == 2
- ansible_version.minor|int < 3
- name: fail if systemd is not present
fail:
msg: "Systemd must be present"
when:
- ansible_service_mgr != 'systemd'
- name: fail on unsupported distribution for iscsi gateways
fail:
msg: "iSCSI gateways can only be deployed on Red Hat Enterprise Linux or CentOS"
when:
- ansible_distribution not in ['RedHat', 'CentOS']
- iscsi_gw_group_name in group_names
- name: fail on unsupported distribution version for iscsi gateways
fail:
msg: "iSCSI gateways can only be deployed on Red Hat Enterprise Linux or CentOS >= 7.4"
when:
- ansible_distribution in ['RedHat', 'CentOS']
- ansible_distribution_version < '7.4'
- iscsi_gw_group_name in group_names