2019-01-17 12:32:46 +01:00
---
- name : (Deprecation) Catch and report renamed settings
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2019-05-25 00:41:04 +02:00
msg : >-
2019-01-17 12:32:46 +01:00
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': 'matrix_nginx_proxy_matrix_client_api_addr_with_proxy_container', 'new' : 'matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container' }
- {'old': 'matrix_nginx_proxy_matrix_client_api_addr_sans_proxy_container', 'new' : 'matrix_nginx_proxy_proxy_matrix_client_api_addr_sans_container' }
2020-07-17 10:31:20 +02:00
# People who configured this to disable Riot, would now wish to be disabling Element.
# We now also have `matrix_nginx_proxy_proxy_riot_compat_redirect_`, but that's something else and is disabled by default.
- {'old': 'matrix_nginx_proxy_proxy_riot_enabled', 'new' : 'matrix_nginx_proxy_proxy_element_enabled' }
2021-01-14 16:47:13 +01:00
- {'old': 'matrix_ssl_lets_encrypt_renew_cron_time_definition', 'new' : '<not configurable anymore>' }
- {'old': 'matrix_nginx_proxy_reload_cron_time_definition', 'new' : '<not configurable anymore>' }
2023-02-27 16:26:22 +01:00
- {'old': 'matrix_nginx_proxy_container_labels_traefik_proxy_matrix_rule', 'new' : '<split into matrix_nginx_proxy_container_labels_traefik_proxy_matrix_client_rule and matrix_nginx_proxy_container_labels_traefik_proxy_matrix_federation_rule>' }
- {'old': 'matrix_nginx_proxy_container_labels_traefik_proxy_matrix_hostname', 'new' : '<split into matrix_nginx_proxy_container_labels_traefik_proxy_matrix_client_hostname and matrix_nginx_proxy_container_labels_traefik_proxy_matrix_federation_hostname>' }
2023-08-25 09:22:25 +02:00
- {'old': 'matrix_nginx_proxy_proxy_jitsi_additional_jvbs', 'new' : '<auto-determined from the jitsi_jvb_servers group in inventory/hosts - see docs/configuring-playbook-jitsi.md>' }
2019-01-17 12:32:46 +01:00
2019-08-02 10:59:10 +02:00
- name : Fail on unknown matrix_ssl_retrieval_method
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2019-08-02 10:59:10 +02:00
msg : >-
`matrix_ssl_retrieval_method` needs to be set to a known value.
when : "matrix_ssl_retrieval_method not in ['lets-encrypt', 'self-signed', 'manually-managed', 'none']"
2020-12-16 10:35:37 +01:00
- name : Fail on unknown matrix_nginx_proxy_ssl_config
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2020-12-16 10:35:37 +01:00
msg : >-
2021-01-08 11:20:29 +01:00
`matrix_nginx_proxy_ssl_preset` needs to be set to a known value.
when : "matrix_nginx_proxy_ssl_preset not in ['modern', 'intermediate', 'old']"
2021-01-14 16:00:46 +01:00
2022-06-23 16:44:11 +02:00
- name : Fail if Basic Auth enabled for metrics, but no credentials supplied
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2022-06-23 16:44:11 +02:00
msg : |
Enabling Basic Auth for metrics (`matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_enabled`) requires :
- either a username/password (provided in `matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_username` and `matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_password`)
- or raw htpasswd content (provided in `matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_raw_content`)
2022-07-18 10:22:05 +02:00
when : "matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_enabled | bool and (matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_raw_content == '' and (matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_username == '' or matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_password == ''))"
2022-06-23 16:44:11 +02:00
2022-09-27 10:38:33 +02:00
- when : "matrix_ssl_retrieval_method == 'lets-encrypt'"
block :
2021-01-14 16:00:46 +01:00
- name : (Deprecation) Catch and report renamed settings
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2021-01-14 16:00:46 +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 }}`).
with_items :
- {'old': 'host_specific_matrix_ssl_support_email', 'new' : 'matrix_ssl_lets_encrypt_support_email' }
- {'old': 'host_specific_matrix_ssl_lets_encrypt_support_email', 'new' : 'matrix_ssl_lets_encrypt_support_email' }
2022-06-23 16:44:11 +02:00
- {'old': 'matrix_nginx_proxy_proxy_synapse_workers_enabled_list', 'new' : '<no longer used>' }
2021-01-14 16:00:46 +01:00
when : "item.old in vars"
- name : Fail if required variables are undefined
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2021-03-17 06:54:00 +01:00
msg : "The `{{ item }}` variable must be defined and have a non-null value"
2021-01-14 16:00:46 +01:00
with_items :
- "matrix_ssl_lets_encrypt_support_email"
2021-11-15 13:46:44 +01:00
- "matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container"
- "matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container"
2021-11-16 20:03:21 +01:00
- "matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container"
- "matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container"
2021-03-17 06:54:00 +01:00
when : "vars[item] == '' or vars[item] is none"
2022-06-23 16:44:11 +02:00
- name : (Deprecation) Catch and report old metrics usage
2022-07-18 09:39:08 +02:00
ansible.builtin.fail :
2022-06-23 16:44:11 +02:00
msg : >-
Your configuration contains a variable (`{{ item }}`), which refers to the old metrics collection system for Synapse,
which exposed metrics on `https://matrix.DOMAIN/_synapse/metrics` and `https://matrix.DOMAIN/_synapse-worker-TYPE-ID/metrics`.
We now recommend exposing Synapse metrics in another way, from another URL.
Refer to the changelog for more details : https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#2022-06-22
with_items :
- matrix_nginx_proxy_proxy_synapse_metrics
- matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled
- matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_key
when : "item in vars"