From 0e01a5a0819760aa57d5ee6dd9f09987ae9f04a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Tue, 24 Jul 2018 11:38:51 +0200 Subject: [PATCH] common: enforce ansible version check MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- roles/ceph-common/tasks/checks/check_system.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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" -- 2.39.5