]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: enforce ansible version check
authorSébastien Han <seb@redhat.com>
Tue, 24 Jul 2018 09:38:51 +0000 (11:38 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 24 Jul 2018 13:35:04 +0000 (15:35 +0200)
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 <seb@redhat.com>
roles/ceph-common/tasks/checks/check_system.yml

index 4e0be38cd92e2718b66107f1d1b80d57aebf38ee..0ca2de906e6e1c46ad08ab84a9339bc25beb26fc 100644 (file)
     - 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"