validate: force ansible version

We currently only support Ansible 2.4.X so let's fail if the version is
different.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/2885/head
Sébastien Han 2018-07-12 11:31:00 +02:00 committed by mergify[bot]
parent 5ef5fcd0b6
commit e61ca882a1
1 changed files with 4 additions and 4 deletions

View File

@ -59,18 +59,18 @@
- ansible_distribution == 'openSUSE Leap' - ansible_distribution == 'openSUSE Leap'
- ansible_distribution_version | version_compare('42.3', '<') - ansible_distribution_version | version_compare('42.3', '<')
- name: fail on unsupported ansible version - name: fail on unsupported ansible version (1.X)
fail: fail:
msg: "Ansible version must be >= 2.3.x, please update!" msg: "Ansible version must be >= 2.4.x, please update!"
when: when:
- ansible_version.major|int < 2 - ansible_version.major|int < 2
- name: fail on unsupported ansible version - name: fail on unsupported ansible version
fail: fail:
msg: "Ansible version must be >= 2.3.x, please update!" msg: "Ansible version must be between 2.4.x and 2.5.x!"
when: when:
- ansible_version.major|int == 2 - ansible_version.major|int == 2
- ansible_version.minor|int < 3 - (ansible_version.minor|int < 4 or ansible_version.minor|int > 5)
- name: fail if systemd is not present - name: fail if systemd is not present
fail: fail: