Move checks from unused validate_config.yml file elsewhere

This commit is contained in:
Slavi Pantaleev 2022-01-07 12:40:56 +02:00
parent 90c9801c56
commit 139c574cdb
2 changed files with 6 additions and 12 deletions

View File

@ -39,9 +39,11 @@
msg: |
The `matrix_homeserver_generic_secret_key` variable must be defined and have a non-null and non-empty value.
If you're seeing this error on an existing homeserver installation, you can fix it easily this error by adding
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
`{% raw %}matrix_homeserver_generic_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"{% endraw %}`
to your vars.yml file. Using another secret for the new variable is also possible and shouldn't cause any trouble.
to your `vars.yml` file. Using another secret value for the new variable is also possible and shouldn't cause any trouble.
when: "matrix_homeserver_generic_secret_key is none or matrix_homeserver_generic_secret_key == ''"
- name: Fail if required variables are undefined
@ -51,6 +53,8 @@
- {'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('') }}"}
when: "item.value is none or item.value == ''"
- name: Fail if uppercase domain used

View File

@ -1,10 +0,0 @@
---
- name: Fail if required Matrix Base settings not defined
fail:
msg: >-
You need to define a required configuration setting (`{{ item }}`) for using this playbook.
when: "vars[item] == ''"
with_items:
- "matrix_homeserver_container_url"
- "matrix_homeserver_container_federation_url"