Rename matrix_appservice_discord_* variables to matrix_bridge_appservice_discord_*

Part of adopting a uniform naming policy for bridge variables,
where the variable prefix matches the role directory name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-07-16 14:46:24 +03:00
parent d9bee18ddd
commit dc16f09e78
9 changed files with 176 additions and 176 deletions
+23 -23
View File
@@ -94,7 +94,7 @@ aux_file_default_group: "{{ matrix_group_name }}"
matrix_homeserver_container_extra_arguments_auto: |
{{
(['--mount type=bind,src=' + matrix_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_appservice_discord_enabled else [])
(['--mount type=bind,src=' + matrix_bridge_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_bridge_appservice_discord_enabled else [])
+
(['--mount type=bind,src=' + matrix_appservice_draupnir_for_all_config_path + '/draupnir-for-all-registration.yaml,dst=/matrix-appservice-draupnir-for-all-registration.yaml,ro'] if matrix_appservice_draupnir_for_all_enabled else [])
+
@@ -153,7 +153,7 @@ matrix_homeserver_container_extra_arguments_auto: |
matrix_homeserver_app_service_config_files_auto: |
{{
(['/matrix-appservice-discord-registration.yaml'] if matrix_appservice_discord_enabled else [])
(['/matrix-appservice-discord-registration.yaml'] if matrix_bridge_appservice_discord_enabled else [])
+
(['/matrix-appservice-draupnir-for-all-registration.yaml'] if matrix_appservice_draupnir_for_all_enabled else [])
+
@@ -352,9 +352,9 @@ devture_systemd_service_manager_services_list_auto: |
([{
'name': 'matrix-appservice-discord.service',
'priority': 2000,
'restart_necessary': (matrix_appservice_discord_restart_necessary | bool),
'restart_necessary': (matrix_bridge_appservice_discord_restart_necessary | bool),
'groups': ['matrix', 'bridges', 'appservice-discord'],
}] if matrix_appservice_discord_enabled else [])
}] if matrix_bridge_appservice_discord_enabled else [])
+
([{
'name': 'matrix-appservice-draupnir-for-all.service',
@@ -1173,42 +1173,42 @@ matrix_authentication_service_syn2mas_synapse_database_socket_path_host: "{{ mat
######################################################################
# We don't enable bridges by default.
matrix_appservice_discord_enabled: false
matrix_bridge_appservice_discord_enabled: false
matrix_appservice_discord_systemd_required_services_list_auto: |
matrix_bridge_appservice_discord_systemd_required_services_list_auto: |
{{
matrix_addons_homeserver_systemd_services_list
+
([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_discord_database_hostname == postgres_connection_hostname) else [])
([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname) else [])
}}
matrix_appservice_discord_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_discord_container_image_registry_prefix_upstream_default }}"
matrix_bridge_appservice_discord_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_appservice_discord_container_image_registry_prefix_upstream_default }}"
matrix_appservice_discord_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9005') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
matrix_bridge_appservice_discord_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9005') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
matrix_appservice_discord_container_network: "{{ matrix_addons_container_network }}"
matrix_bridge_appservice_discord_container_network: "{{ matrix_addons_container_network }}"
matrix_appservice_discord_container_additional_networks_auto: |-
matrix_bridge_appservice_discord_container_additional_networks_auto: |-
{{
(
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
+
([postgres_container_network] if (postgres_enabled and matrix_appservice_discord_database_hostname == postgres_connection_hostname and matrix_appservice_discord_container_network != postgres_container_network) else [])
([postgres_container_network] if (postgres_enabled and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname and matrix_bridge_appservice_discord_container_network != postgres_container_network) else [])
) | unique
}}
# If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
matrix_appservice_discord_bridge_disablePresence: "{{ (not matrix_synapse_presence_enabled) if matrix_homeserver_implementation == 'synapse' else false }}"
matrix_bridge_appservice_discord_bridge_disablePresence: "{{ (not matrix_synapse_presence_enabled) if matrix_homeserver_implementation == 'synapse' else false }}"
matrix_appservice_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.as.token') | hash('sha512') | to_uuid }}"
matrix_bridge_appservice_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.as.token') | hash('sha512') | to_uuid }}"
matrix_appservice_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.hs.token') | hash('sha512') | to_uuid }}"
matrix_bridge_appservice_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.hs.token') | hash('sha512') | to_uuid }}"
# We only make this use Postgres if our own Postgres server is enabled.
# It's only then (for now) that we can automatically create the necessary database and user for this service.
matrix_appservice_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
matrix_appservice_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
matrix_appservice_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.discord.db') | hash('sha512') | to_uuid }}"
matrix_bridge_appservice_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
matrix_bridge_appservice_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
matrix_bridge_appservice_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.discord.db') | hash('sha512') | to_uuid }}"
######################################################################
#
@@ -4141,10 +4141,10 @@ postgres_managed_databases_auto: |
}] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
+
([{
'name': matrix_appservice_discord_database_name,
'username': matrix_appservice_discord_database_username,
'password': matrix_appservice_discord_database_password,
}] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == postgres_connection_hostname) else [])
'name': matrix_bridge_appservice_discord_database_name,
'username': matrix_bridge_appservice_discord_database_username,
'password': matrix_bridge_appservice_discord_database_password,
}] if (matrix_bridge_appservice_discord_enabled and matrix_bridge_appservice_discord_database_engine == 'postgres' and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname) else [])
+
([{
'name': matrix_appservice_draupnir_for_all_database_name,
@@ -5100,7 +5100,7 @@ matrix_ketesa_config_asManagedUsers_auto: |
+
([
'^@_discord_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
] if matrix_appservice_discord_enabled else [])
] if matrix_bridge_appservice_discord_enabled else [])
+
([
'^@'+(matrix_beeper_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',