2015-01-07 18:41:35 +08:00
|
|
|
---
|
2015-05-16 00:27:41 +08:00
|
|
|
- name: fail on unsupported system
|
2015-09-04 00:18:53 +08:00
|
|
|
fail:
|
|
|
|
msg: "System not supported {{ ansible_system }}"
|
2016-01-08 21:54:00 +08:00
|
|
|
when: "'{{ ansible_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:
|
|
|
|
msg: "Architecture not supported {{ ansible_architecture }}"
|
2016-01-08 21:54:00 +08:00
|
|
|
when: "'{{ ansible_architecture }}' not in ['x86_64']"
|
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:
|
|
|
|
msg: "Distribution not supported {{ ansible_os_family }}"
|
2016-01-08 21:54:00 +08:00
|
|
|
when: "'{{ ansible_os_family }}' not in ['Debian', 'RedHat']"
|
2015-07-01 21:58:38 +08:00
|
|
|
|
|
|
|
- name: fail on unsupported distribution for red hat storage
|
2015-09-04 00:18:53 +08:00
|
|
|
fail:
|
|
|
|
msg: "Distribution not supported {{ ansible_distribution_version }} by Red Hat Storage, only RHEL 7.1"
|
2015-07-01 21:58:38 +08:00
|
|
|
when:
|
|
|
|
ceph_stable_rh_storage and
|
|
|
|
{{ ansible_distribution_version | version_compare('7.1', '<') }}
|
2015-11-20 22:17:24 +08:00
|
|
|
|
|
|
|
- name: check ansible version
|
|
|
|
local_action: shell ansible --version | awk '/[0-9].[0-9].[0-9]/ {print $2}'
|
|
|
|
changed_when: false
|
|
|
|
sudo: false
|
2016-01-23 00:43:47 +08:00
|
|
|
register: ansible__version
|
2015-11-20 22:17:24 +08:00
|
|
|
|
|
|
|
- name: fail on unsupported ansible version
|
|
|
|
fail:
|
|
|
|
msg: "Ansible version must be >= 1.9, please update!"
|
2016-01-23 00:43:47 +08:00
|
|
|
when: "{{ ansible__version.stdout | version_compare('1.9', '<') }}"
|