2018-12-23 18:14:01 +01:00
---
2021-12-23 15:28:34 +01:00
- name : Fail if invalid homeserver implementation
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2021-12-23 15:28:34 +01:00
msg : "You need to set a valid homeserver implementation in `matrix_homeserver_implementation`"
2022-08-04 21:35:41 +02:00
when : "matrix_homeserver_implementation not in ['synapse', 'dendrite', 'conduit']"
2021-12-17 18:00:17 +01:00
2019-02-28 10:51:09 +01:00
- name : (Deprecation) Catch and report renamed settings
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2019-02-28 10:51:09 +01:00
msg : >-
Your configuration contains a variable, which now has a different name.
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
when : "item.old in vars"
with_items :
- {'old': 'host_specific_hostname_identity', 'new' : 'matrix_domain' }
- {'old': 'hostname_identity', 'new' : 'matrix_domain' }
- {'old': 'hostname_matrix', 'new' : 'matrix_server_fqn_matrix' }
2020-07-17 10:31:20 +02:00
- {'old': 'hostname_riot', 'new' : 'matrix_server_fqn_element' }
- {'old': 'matrix_server_fqn_riot', 'new' : 'matrix_server_fqn_element' }
2019-02-28 10:51:09 +01:00
2022-01-07 15:00:42 +01:00
# We have a dedicated check for this variable, because we'd like to have a custom (friendlier) message.
- name : Fail if matrix_homeserver_generic_secret_key is undefined
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2022-01-07 15:00:42 +01:00
msg : |
The `matrix_homeserver_generic_secret_key` variable must be defined and have a non-null and non-empty value.
2022-01-07 11:40:56 +01:00
If you're observing this error on a new installation, you should ensure that the `matrix_homeserver_generic_secret_key` is defined.
If you're observing this error on an existing homeserver installation, you can fix it easily and in a backward-compatible way by adding
2022-01-07 15:00:42 +01:00
`{% raw %}matrix_homeserver_generic_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"{% endraw %}`
2022-01-07 11:40:56 +01:00
to your `vars.yml` file. Using another secret value for the new variable is also possible and shouldn't cause any trouble.
2022-01-07 15:00:42 +01:00
when : "matrix_homeserver_generic_secret_key is none or matrix_homeserver_generic_secret_key == ''"
2019-02-28 10:51:09 +01:00
- name : Fail if required variables are undefined
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2022-01-07 15:00:42 +01:00
msg : "The `{{ item.var }}` variable must be defined and have a non-null and non-empty value"
2019-02-28 10:51:09 +01:00
with_items :
2022-07-18 10:22:05 +02:00
- {'var': matrix_domain, 'value' : "{{ matrix_domain | default('') }}" }
- {'var': matrix_server_fqn_matrix, 'value' : "{{ matrix_server_fqn_matrix | default('') }}" }
- {'var': matrix_server_fqn_element, 'value' : "{{ matrix_server_fqn_element | default('') }}" }
- {'var': matrix_homeserver_container_url, 'value' : "{{ matrix_homeserver_container_url | default('') }}" }
- {'var': matrix_homeserver_container_federation_url, 'value' : "{{ matrix_homeserver_container_federation_url | default('') }}" }
2022-01-07 15:00:42 +01:00
when : "item.value is none or item.value == ''"
2019-02-28 10:51:09 +01:00
2018-12-23 18:20:53 +01:00
- name : Fail if uppercase domain used
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2018-12-23 18:20:53 +01:00
msg : "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
with_items :
2019-02-28 10:51:09 +01:00
- "{{ matrix_domain }}"
- "{{ matrix_server_fqn_matrix }}"
2020-07-17 10:31:20 +02:00
- "{{ matrix_server_fqn_element }}"
2022-07-18 11:28:39 +02:00
when : "item != item | lower"
2020-03-28 11:39:15 +01:00
2022-07-14 15:57:59 +02:00
- name : Fail if encountering usage of removed role (mx-puppet-skype)
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2022-07-14 15:57:59 +02:00
msg : >-
Your configuration seems to include a reference to `matrix_mx_puppet_skype_enabled`. Are you trying to install the mx-puppet-skype bridge?
The playbook no longer includes a role for installing mx-puppet-skype, because the mx-puppet-bridge is unmaintained and has been reported as broken for a long time.
To get rid of this error, remove all `matrix_mx_puppet_*` references from your configuration.
To clean up your server from mx-puppet-skype's presence, see this changelog entry : https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#mx-puppet-skype-removal.
If you still need bridging to Skype, consider switching to the go-skype bridge instead. See `docs/configuring-playbook-bridge-go-skype-bridge.md`.
when : "'matrix_mx_puppet_skype_enabled' in vars"