Make matrix_homeserver_implementation influence matrix_IMPLEMENTATION_enabled, not the other way around

Doing this seems more reasonable and simpler.
This commit is contained in:
Slavi Pantaleev
2021-12-23 16:28:34 +02:00
parent 4139290cc9
commit 1dfe21944f
5 changed files with 19 additions and 26 deletions

View File

@ -1,15 +1,9 @@
---
- name: Fail if 0 or more than 1 homeserver implementations enabled
- name: Fail if invalid homeserver implementation
fail:
msg: >-
You have 0 or more than 1 homeserver implementations enabled
({{ matrix_homeserver_enabled_implementations_list|join(', ') }}).
If you have more than 1 implementation enabled, you can disable the unnecessary implementations by adding `matrix_IMPLEMENTATION_enabled: false` to your vars.yml file.
If you have 0 implementations enabled, you can enable one by adding `matrix_IMPLEMENTATION_enabled: false` to your vars.yml file (e.g. `matrix_dendrite_enabled: true`).
when: "matrix_homeserver_enabled_implementations_list|length != 1"
msg: "You need to set a valid homeserver implementation in `matrix_homeserver_implementation`"
when: "matrix_homeserver_implementation not in ['synapse', 'dendrite']"
# We generally support Ansible 2.7.1 and above.
- name: Fail if running on Ansible < 2.7.1