Add Ansible guide and Ansible version checks
After having multiple people report issues with retrieving SSL certificates, we've finally discovered the culprit to be Ansible 2.5.1 (default and latest version on Ubuntu 18.04 LTS). As silly as it is, certain distributions ("LTS" even) are 13 bugfix versions of Ansible behind. From now on, we try to auto-detect buggy Ansible versions and tell the user. We also provide some tips for how to upgrade Ansible or run it from inside a Docker container. My testing shows that Ansible 2.4.0 and 2.4.6 are OK. All other intermediate 2.4.x versions haven't been tested, but we trust they're OK too. From the 2.5.x releases, only 2.5.0 and 2.5.1 seem to be affected. Ansible 2.5.2 corrects the problem with `include_tasks` + `with_items`.
This commit is contained in:
@ -1,5 +1,20 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
matrix_ansible_outdated_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"
|
||||
|
||||
- name: Fail if running on Ansible < 2.4
|
||||
fail:
|
||||
msg: "{{ matrix_ansible_outdated_fail_msg }}"
|
||||
when: "ansible_version.major <= 2 and ansible_version.minor < 4"
|
||||
|
||||
# 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.x (lower than 2.5.2)
|
||||
fail:
|
||||
msg: "{{ matrix_ansible_outdated_fail_msg }}"
|
||||
when: "ansible_version.major == 2 and ansible_version.minor == 5 and ansible_version.revision < 2"
|
||||
|
||||
- name: Fail if Macaroon key is missing
|
||||
fail:
|
||||
msg: "You need to set a secret in the matrix_synapse_macaroon_secret_key variable"
|
||||
@ -21,4 +36,4 @@
|
||||
with_items:
|
||||
- "{{ hostname_identity }}"
|
||||
- "{{ hostname_matrix }}"
|
||||
- "{{ hostname_riot }}"
|
||||
- "{{ hostname_riot }}"
|
||||
|
Reference in New Issue
Block a user