Add matrix_homeserver_implementation, tracking the current homeserver implementation

The goal is to have a single variable which tells us which homeserver
software is in use. Much simpler than having if/elif/elif checks for
variables like (`matrix_synapse_enabled` and `matrix_dendrite_enabled`, etc.)
everywhere.
This commit is contained in:
Slavi Pantaleev
2021-12-17 19:00:17 +02:00
parent 63968cb04f
commit 3cf9f87097
4 changed files with 30 additions and 1 deletions

View File

@ -17,6 +17,17 @@ matrix_container_global_registry_prefix: "docker.io/"
#
######################################################################
matrix_homeserver_enabled_implementations_list: |
{{
(
(['synapse'] if matrix_synapse_enabled else [])
+
(['dendrite'] if matrix_dendrite_enabled else [])
)
}}
matrix_homeserver_implementation: "{{ matrix_homeserver_enabled_implementations_list[0] if matrix_homeserver_enabled_implementations_list|length == 1 else '' }}"
matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
# If Synapse workers are enabled and matrix-nginx-proxy is disabled, certain APIs may not work over 'http://matrix-synapse:{{ matrix_synapse_container_client_api_port }}'.