Define matrix_media_repo_homeservers_auto in group vars

This is mostly so as to avoid referring to variables from other roles,
like `matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container`.
This commit is contained in:
Slavi Pantaleev 2024-01-09 16:07:23 +02:00
parent 883afa11dc
commit 3e19c8b102
2 changed files with 22 additions and 21 deletions

View File

@ -2749,6 +2749,27 @@ matrix_media_repo_systemd_required_services_list: |
([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and matrix_media_repo_database_hostname == devture_postgres_connection_hostname else []) ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and matrix_media_repo_database_hostname == devture_postgres_connection_hostname else [])
}} }}
# Auto configured server setup by the playbook
matrix_media_repo_homeservers_auto:
- # Keep the dash from this line.
# This should match the server_name of your homeserver, and the Host header
# provided to the media repo.
name: "{{ matrix_domain }}"
# The base URL to where the homeserver can actually be reached by MMR.
csApi: "http://{{ matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container }}"
# The number of consecutive failures in calling this homeserver before the
# media repository will start backing off. This defaults to 10 if not given.
backoffAt: 10
# The admin API interface supported by the homeserver. MMR uses a subset of the admin API
# during certain operations, like attempting to purge media from a room or validating server
# admin status. This should be set to one of "synapse", "dendrite", or "matrix". When set
# to "matrix", most functionality requiring the admin API will not work.
adminApiKind: "{{ 'synapse' if matrix_homeserver_implementation == 'synapse' else ('dendrite' if matrix_homeserver_implementation == 'dendrite' else 'matrix') }}"
###################################################################### ######################################################################
# #
# /matrix-media-repo # /matrix-media-repo

View File

@ -237,28 +237,8 @@ matrix_media_repo_database_max_idle_connections: 5
# The configuration for the homeservers this media repository is known to control. Servers # The configuration for the homeservers this media repository is known to control. Servers
# not listed here will not be able to upload media. # not listed here will not be able to upload media.
matrix_media_repo_homeservers: "{{ matrix_media_repo_homeservers_auto + matrix_media_repo_homeservers_additional }}" matrix_media_repo_homeservers: "{{ matrix_media_repo_homeservers_auto + matrix_media_repo_homeservers_additional }}"
# Auto configured server setup by the playbook # Auto configured server setup by the playbook
matrix_media_repo_homeservers_auto: matrix_media_repo_homeservers_auto: []
- # Keep the dash from this line.
# This should match the server_name of your homeserver, and the Host header
# provided to the media repo.
name: "{{ matrix_domain }}"
# The base URL to where the homeserver can actually be reached by MMR.
csApi: "http://{{ matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container }}"
# The number of consecutive failures in calling this homeserver before the
# media repository will start backing off. This defaults to 10 if not given.
backoffAt: 10
# The admin API interface supported by the homeserver. MMR uses a subset of the admin API
# during certain operations, like attempting to purge media from a room or validating server
# admin status. This should be set to one of "synapse", "dendrite", or "matrix". When set
# to "matrix", most functionality requiring the admin API will not work.
adminApiKind: "{{ 'synapse' if matrix_homeserver_implementation == 'synapse' else ('dendrite' if matrix_homeserver_implementation == 'dendrite' else 'matrix') }}"
# Additional servers to be managed by MMR # Additional servers to be managed by MMR
matrix_media_repo_homeservers_additional: [] matrix_media_repo_homeservers_additional: []