From 7eb8192a5121369002e6241e3733eb2b3d25dbfa Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 29 Sep 2020 12:37:39 +0300 Subject: [PATCH] Comlain about version requirement on Ansible v1 I don't believe Ansible v1 would even go as far as executing this sanity check, but.. Adding an extra defensive check for completeness. --- roles/matrix-base/tasks/sanity_check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/matrix-base/tasks/sanity_check.yml b/roles/matrix-base/tasks/sanity_check.yml index 3541b1b2..23f90b85 100644 --- a/roles/matrix-base/tasks/sanity_check.yml +++ b/roles/matrix-base/tasks/sanity_check.yml @@ -1,11 +1,13 @@ --- +# We generally support Ansible 2.5.2 and above. +# # Ansible 2.5.0 and 2.5.1 are known to have a bug with `include_tasks` + `with_items`. # The bug has been fixed in Ansible 2.5.2. - name: Fail if running on Ansible < 2.5 or Ansible 2.5.x (lower than 2.5.2) fail: msg: "You are running on Ansible {{ ansible_version.string }}, which is not supported. See our guide about Ansible: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/ansible.md" - when: "(ansible_version.major <= 2 and ansible_version.minor < 5) or (ansible_version.major == 2 and ansible_version.minor == 5 and ansible_version.revision < 2)" + when: "(ansible_version.major < 2) or (ansible_version.major <= 2 and ansible_version.minor < 5) or (ansible_version.major == 2 and ansible_version.minor == 5 and ansible_version.revision < 2)" - name: (Deprecation) Catch and report renamed settings fail: