Parcourir la source

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.
pull/663/head
Slavi Pantaleev il y a 5 ans
Parent
révision
23daec748c
2 fichiers modifiés avec 5 ajouts et 8 suppressions
  1. +2
    -2
      docs/ansible.md
  2. +3
    -6
      roles/matrix-base/tasks/sanity_check.yml

+ 2
- 2
docs/ansible.md Voir le fichier

@@ -9,7 +9,7 @@ If your local computer cannot run Ansible, you can also run Ansible on some serv

## Supported Ansible versions

Ansible 2.5.2 or newer is required.
Ansible 2.7.0 or newer is required.


## Checking your Ansible version
@@ -49,7 +49,7 @@ docker run -it --rm \
-v `pwd`:/work \
-v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro \
--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`).


+ 3
- 6
roles/matrix-base/tasks/sanity_check.yml Voir le fichier

@@ -1,13 +1,10 @@
---

# 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)
# We generally support Ansible 2.7.0 and above.
- name: Fail if running on Ansible < 2.7
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) 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
fail:


Chargement…
Annuler
Enregistrer