Sfoglia il codice sorgente

Move checks from unused validate_config.yml file elsewhere

pull/1520/head
Slavi Pantaleev 4 anni fa
parent
commit
139c574cdb
2 ha cambiato i file con 6 aggiunte e 12 eliminazioni
  1. +6
    -2
      roles/matrix-base/tasks/sanity_check.yml
  2. +0
    -10
      roles/matrix-base/tasks/validate_config.yml

+ 6
- 2
roles/matrix-base/tasks/sanity_check.yml Vedi 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


+ 0
- 10
roles/matrix-base/tasks/validate_config.yml Vedi 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"

Caricamento…
Annulla
Salva