From: Sébastien Han Date: Tue, 24 Jul 2018 09:38:51 +0000 (+0200) Subject: common: enforce ansible version check X-Git-Tag: v3.0.40~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0e01a5a0819760aa57d5ee6dd9f09987ae9f04a1;p=ceph-ansible.git common: enforce ansible version check Make sure we fail if the Ansible version is >= 2.5, stable-3.0 only support Ansible between 2.3.x and 2.4.x. Signed-off-by: Sébastien Han --- diff --git a/roles/ceph-common/tasks/checks/check_system.yml b/roles/ceph-common/tasks/checks/check_system.yml index 4e0be38cd..0ca2de906 100644 --- a/roles/ceph-common/tasks/checks/check_system.yml +++ b/roles/ceph-common/tasks/checks/check_system.yml @@ -52,19 +52,26 @@ - ceph_repository == 'uca' - ansible_distribution != 'Ubuntu' -- name: fail on unsupported ansible version +- name: fail on unsupported ansible version (<2.x) fail: - msg: "Ansible version must be >= 2.3.x, please update!" + msg: "Ansible version must be >= 2.3.x AND < 2.5!" when: - ansible_version.major|int < 2 -- name: fail on unsupported ansible version +- name: fail on unsupported ansible version (<2.3) fail: - msg: "Ansible version must be >= 2.3.x, please update!" + msg: "Ansible version must be >= 2.3.x AND < 2.5!" when: - ansible_version.major|int == 2 - ansible_version.minor|int < 3 +- name: fail on unsupported ansible version (>= 2.5) + fail: + msg: "Ansible version must be >= 2.3.x AND < 2.5!" + when: + - ansible_version.major|int == 2 + - ansible_version.minor|int >= 5 + - name: fail if systemd is not present fail: msg: "Systemd must be present"