mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-11-09 19:48:57 +01:00
Add MatrixZulipBridge (#4695)
* Add links to MatrixZulipBridge Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Add MatrixZulipBridge: copy matrix-bridge-heisenbridge Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Rename matrix-heisenbridge.service.j2 to matrix-matrixzulipbridge.service.j2 - Add the license header to matrix-matrixzulipbridge.service.j2 Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Replace "Heisenbridge" to "MatrixZulipBridge" to "heisenbridge" to "matrixzulipbridge", respectively Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Replace variables related to container image and version Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update comments and copyright headers Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update matrix-bridge-matrixzulipbridge/tasks/main.yml: add names to tasks Reuseaa0591f8b0/tasks/main.ymlSigned-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Remove configuration for identd Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Add `matrix_matrixzulipbridge_container_http_port` Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Run ansible-lint for files in tasks/ Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Update `matrix_matrixzulipbridge_registration_yaml` Run `pip install matrixzulipbridge && python3 -m matrixzulipbridge --config config.yaml --generate` to generate config.yaml Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Add MatrixZulipBridge to files in group_vars Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Add configuring-playbook-bridge-matrixzulipbridge.md Reuseb108c8a151/docs/configuring-playbook-bridge-heisenbridge.mdSigned-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Fix `matrix_matrixzulipbridge_config_media_path` Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> * Remove space characters Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Replace "matrixzulipbridge" with "zulip", etc. Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Remove irrelevant instruction Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * MatrixZulipBridge → Zulip bridge Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Rename `@matrixzulipbridge` to `@zulipbot` Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Replace `matrix_bridge_zulip` with `matrix_zulip_bridge` for now Refer to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4695#discussion_r2485317210 Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Set `{{ matrix_admin if matrix_admin else '' }}` to `matrix_zulip_bridge_owner` Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Apply the review Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Reuse the section about adjusting the playbook configuration on configuring-playbook-bridge-postmoogle.md Reuse7862fd7cdd/docs/configuring-playbook-bridge-postmoogle.mdSigned-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> * Update configuring-playbook.md: sort list items Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> --------- Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org> Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5> Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org> Co-authored-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
This commit is contained in:
@@ -116,6 +116,8 @@ matrix_homeserver_container_extra_arguments_auto: |
|
||||
+
|
||||
(['--mount type=bind,src=' + matrix_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_hookshot_enabled else [])
|
||||
+
|
||||
(['--mount type=bind,src=' + matrix_zulip_bridge_base_path + '/registration.yaml,dst=/matrixzulipbridge-registration.yaml,ro'] if matrix_zulip_bridge_enabled else [])
|
||||
+
|
||||
(['--mount type=bind,src=' + matrix_mautrix_bluesky_config_path + '/registration.yaml,dst=/matrix-mautrix-bluesky-registration.yaml,ro'] if matrix_mautrix_bluesky_enabled else [])
|
||||
+
|
||||
(['--mount type=bind,src=' + matrix_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_mautrix_discord_enabled else [])
|
||||
@@ -181,6 +183,8 @@ matrix_homeserver_app_service_config_files_auto: |
|
||||
+
|
||||
(['/hookshot-registration.yml'] if matrix_hookshot_enabled else [])
|
||||
+
|
||||
(['/matrixzulipbridge-registration.yaml'] if matrix_zulip_bridge_enabled else [])
|
||||
+
|
||||
(['/matrix-mautrix-bluesky-registration.yaml'] if matrix_mautrix_bluesky_enabled else [])
|
||||
+
|
||||
(['/matrix-mautrix-discord-registration.yaml'] if matrix_mautrix_discord_enabled else [])
|
||||
@@ -315,6 +319,8 @@ devture_systemd_service_manager_services_list_auto: |
|
||||
+
|
||||
([{'name': 'matrix-hookshot.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'hookshot', 'bridge-hookshot']}] if matrix_hookshot_enabled else [])
|
||||
+
|
||||
([{'name': 'matrix-zulip-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'zulip']}] if matrix_zulip_bridge_enabled else [])
|
||||
+
|
||||
([{'name': 'matrix-mautrix-bluesky.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-bluesky']}] if matrix_mautrix_bluesky_enabled else [])
|
||||
+
|
||||
([{'name': 'matrix-mautrix-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-discord']}] if matrix_mautrix_discord_enabled else [])
|
||||
@@ -2288,6 +2294,55 @@ matrix_hookshot_public_hostname: "{{ matrix_server_fqn_matrix }}"
|
||||
#
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# matrix-bridge-zulip
|
||||
#
|
||||
######################################################################
|
||||
|
||||
# We don't enable bridges by default.
|
||||
matrix_zulip_bridge_enabled: false
|
||||
|
||||
matrix_zulip_bridge_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
|
||||
|
||||
# Set this to your Matrix ID if you want to enforce the owner, otherwise first _local_ user becomes one
|
||||
matrix_zulip_bridge_owner: "{{ matrix_admin if matrix_admin else '' }}"
|
||||
|
||||
matrix_zulip_bridge_systemd_required_services_list_auto: |
|
||||
{{
|
||||
matrix_addons_homeserver_systemd_services_list
|
||||
}}
|
||||
|
||||
matrix_zulip_bridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_zulip_bridge_docker_image_registry_prefix_upstream_default }}"
|
||||
|
||||
matrix_zulip_bridge_container_network: "{{ matrix_addons_container_network }}"
|
||||
|
||||
matrix_zulip_bridge_container_additional_networks_auto: |-
|
||||
{{
|
||||
(
|
||||
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
|
||||
+
|
||||
[matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_zulip_bridge_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
|
||||
) | unique
|
||||
}}
|
||||
|
||||
matrix_zulip_bridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
|
||||
matrix_zulip_bridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
|
||||
matrix_zulip_bridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
|
||||
matrix_zulip_bridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
|
||||
|
||||
matrix_zulip_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'zulip.as.tok', rounds=655555) | to_uuid }}"
|
||||
|
||||
matrix_zulip_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'zulip.hs.tok', rounds=655555) | to_uuid }}"
|
||||
|
||||
matrix_zulip_bridge_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# /matrix-bridge-zulip
|
||||
#
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# matrix-bridge-mx-puppet-steam
|
||||
@@ -4921,6 +4976,11 @@ matrix_synapse_admin_config_asManagedUsers_auto: |
|
||||
'^@hbirc_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
|
||||
] if matrix_heisenbridge_enabled else [])
|
||||
+
|
||||
([
|
||||
'^@zulipbot:'+(matrix_domain | regex_escape)+'$',
|
||||
'^@zulip_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
|
||||
] if matrix_zulip_bridge_enabled else [])
|
||||
+
|
||||
([
|
||||
'^@hookshot:'+(matrix_domain | regex_escape)+'$',
|
||||
'^@_github_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
|
||||
|
||||
Reference in New Issue
Block a user