mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-14 22:42:51 +01:00
b9b5674b8a
If uppercase is used, certain tools (like certbot) would cause trouble. They would retrieve a certificate for the lowercased domain name, but we'd try to use it from an uppercase-named directory, which will fail. Besides certbot, we may experience other trouble too. (it hasn't been investigated how far the breakage goes). To fix it all, we lowercase `host_specific_hostname_identity` by default, which takes care of the general use-case (people only setting that and relying on us to build the other domain names - `hostname_matrix` and `hostname_riot`). For others, who decide to override these other variables directly (and who may work around us and introduce uppercase there directly), we also have the sanity-check tool warn if uppercase is detected in any of the final domains.
24 lines
991 B
YAML
24 lines
991 B
YAML
---
|
|
|
|
- name: Fail if Macaroon key is missing
|
|
fail:
|
|
msg: "You need to set a secret in the matrix_synapse_macaroon_secret_key variable"
|
|
when: "matrix_synapse_macaroon_secret_key == ''"
|
|
|
|
- name: Fail if Coturn Auth secret is missing
|
|
fail:
|
|
msg: "You need to set a secret in the matrix_coturn_turn_static_auth_secret variable"
|
|
when: "matrix_coturn_turn_static_auth_secret == ''"
|
|
|
|
# This sanity check is only used to detect uppercase when people override these specific variables.
|
|
#
|
|
# If people set `host_specific_hostname_identity` without overriding other variables (the general use-case),
|
|
# we take care to lower-case it automatically and it won't cause trouble anyway.
|
|
- name: Fail if uppercase domain used
|
|
fail:
|
|
msg: "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
|
|
when: "item != item|lower"
|
|
with_items:
|
|
- "{{ hostname_identity }}"
|
|
- "{{ hostname_matrix }}"
|
|
- "{{ hostname_riot }}" |