Require Ansible v2.7 or newer (because of items2dict and dict2items)

Interestingly, no one has reported this failure before #662 (Github
Issue).

It doesn't make sense to keep saying that we support such old Ansible
versions, when we're not even testing on anything close to those.

Time is also passing and such versions are getting more and more
ancient. It's time we bumped our requirements to something that is more
likely to work.
This commit is contained in:
Slavi Pantaleev 2020-10-02 11:52:17 +03:00
parent 07fa8404bf
commit 23daec748c
2 changed files with 5 additions and 8 deletions

View File

@ -9,7 +9,7 @@ If your local computer cannot run Ansible, you can also run Ansible on some serv
## Supported Ansible versions ## Supported Ansible versions
Ansible 2.5.2 or newer is required. Ansible 2.7.0 or newer is required.
## Checking your Ansible version ## Checking your Ansible version
@ -49,7 +49,7 @@ docker run -it --rm \
-v `pwd`:/work \ -v `pwd`:/work \
-v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro \ -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro \
--entrypoint=/bin/sh \ --entrypoint=/bin/sh \
devture/ansible:2.9.9-r0 devture/ansible:2.9.13-r0
``` ```
The above command tries to mount an SSH key (`$HOME/.ssh/id_rsa`) into the container (at `/root/.ssh/id_rsa`). The above command tries to mount an SSH key (`$HOME/.ssh/id_rsa`) into the container (at `/root/.ssh/id_rsa`).

View File

@ -1,13 +1,10 @@
--- ---
# We generally support Ansible 2.5.2 and above. # We generally support Ansible 2.7.0 and above.
# - name: Fail if running on Ansible < 2.7
# 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: 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" 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) 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)" when: "(ansible_version.major < 2) or (ansible_version.major <= 2 and ansible_version.minor < 7)"
- name: (Deprecation) Catch and report renamed settings - name: (Deprecation) Catch and report renamed settings
fail: fail: