From 6b21b03e717cb78027845014dc5db0747681ba05 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Tue, 4 Nov 2025 13:07:41 +0900 Subject: [PATCH] Apply the review Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-bridge-zulip.md | 4 ++-- group_vars/matrix_servers | 5 ++++- roles/custom/matrix-bridge-zulip/defaults/main.yml | 5 +---- roles/custom/matrix-bridge-zulip/tasks/setup_install.yml | 6 +++--- roles/custom/matrix-bridge-zulip/tasks/setup_uninstall.yml | 6 +++--- roles/custom/matrix-bridge-zulip/templates/labels.j2 | 2 +- ...ulipbridge.service.j2 => matrix-zulip-bridge.service.j2} | 0 7 files changed, 14 insertions(+), 14 deletions(-) rename roles/custom/matrix-bridge-zulip/templates/systemd/{matrix-matrixzulipbridge.service.j2 => matrix-zulip-bridge.service.j2} (100%) diff --git a/docs/configuring-playbook-bridge-zulip.md b/docs/configuring-playbook-bridge-zulip.md index 6373a2b19..501c1ac72 100644 --- a/docs/configuring-playbook-bridge-zulip.md +++ b/docs/configuring-playbook-bridge-zulip.md @@ -25,7 +25,7 @@ To enable the Zulip bridge, add the following configuration to your `inventory/h ```yaml matrix_zulip_bridge_enabled: true -# Setting the owner is optional as the first local user to DM `@matrixzulipbridge:example.com` will be made the owner. +# Setting the owner is optional as the first local user to DM `@zulipbridge:example.com` will be made the owner. # If you are not using a local user you must set it as otherwise you can't DM it at all. matrix_zulip_bridge_owner: "@alice:{{ matrix_domain }}" ``` @@ -69,7 +69,7 @@ The shortcut commands with the [`just` program](just.md) are also available: `ju ## Usage -To use the bridge, you need to start a chat with `@matrixzulipbridge:example.com` (where `example.com` is your base domain, not the `matrix.` domain). If the bridge ignores you and a DM is not accepted then the owner setting may be wrong. +To use the bridge, you need to start a chat with `@zulipbridge:example.com` (where `example.com` is your base domain, not the `matrix.` domain). If the bridge ignores you and a DM is not accepted then the owner setting may be wrong. If you encounter issues or feel lost you can join the project room at [#matrixzulipbridge:shema.lv](https://matrix.to/#/#matrixzulipbridge:shema.lv) for help. diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 9fa616ba5..4cf227039 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -343,7 +343,7 @@ 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-bridge-zulip.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'matrixzulipbridge']}] if matrix_zulip_bridge_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 []) + @@ -2387,6 +2387,9 @@ 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 diff --git a/roles/custom/matrix-bridge-zulip/defaults/main.yml b/roles/custom/matrix-bridge-zulip/defaults/main.yml index fd6cd204b..c6fc8fb9c 100644 --- a/roles/custom/matrix-bridge-zulip/defaults/main.yml +++ b/roles/custom/matrix-bridge-zulip/defaults/main.yml @@ -26,9 +26,6 @@ matrix_zulip_bridge_docker_image_registry_prefix_upstream: "{{ matrix_zulip_brid matrix_zulip_bridge_docker_image_registry_prefix_upstream_default: ghcr.io/ matrix_zulip_bridge_docker_image_force_pull: "{{ matrix_zulip_bridge_docker_image.endswith(':latest') }}" -# 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_base_path: "{{ matrix_base_data_path }}/zulip" matrix_zulip_bridge_container_network: "" @@ -109,7 +106,7 @@ matrix_zulip_bridge_registration_yaml_bridge_zulip: # Besides registration information, it contains configuration (see the Zulip bridge key). matrix_zulip_bridge_registration_yaml: id: zulipbridge - url: http://matrix-bridge-zulip:{{ matrix_zulip_bridge_container_http_port }} + url: http://matrix-zulip-bridge:{{ matrix_zulip_bridge_container_http_port }} as_token: "{{ matrix_zulip_bridge_appservice_token }}" hs_token: "{{ matrix_zulip_bridge_homeserver_token }}" rate_limited: false diff --git a/roles/custom/matrix-bridge-zulip/tasks/setup_install.yml b/roles/custom/matrix-bridge-zulip/tasks/setup_install.yml index acb688a22..f05ba91fc 100644 --- a/roles/custom/matrix-bridge-zulip/tasks/setup_install.yml +++ b/roles/custom/matrix-bridge-zulip/tasks/setup_install.yml @@ -55,8 +55,8 @@ driver: bridge driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}" -- name: Ensure matrix-bridge-zulip.service installed +- name: Ensure matrix-zulip-bridge.service installed ansible.builtin.template: - src: "{{ role_path }}/templates/systemd/matrix-bridge-zulip.service.j2" - dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bridge-zulip.service" + src: "{{ role_path }}/templates/systemd/matrix-zulip-bridge.service.j2" + dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-zulip-bridge.service" mode: "0644" diff --git a/roles/custom/matrix-bridge-zulip/tasks/setup_uninstall.yml b/roles/custom/matrix-bridge-zulip/tasks/setup_uninstall.yml index 2cf1e3916..5ae51b283 100644 --- a/roles/custom/matrix-bridge-zulip/tasks/setup_uninstall.yml +++ b/roles/custom/matrix-bridge-zulip/tasks/setup_uninstall.yml @@ -8,7 +8,7 @@ --- - name: Check existence of matrix-bridge-zulip service ansible.builtin.stat: - path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bridge-zulip.service" + path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-zulip-bridge.service" register: matrix_zulip_bridge_service_stat - when: matrix_zulip_bridge_service_stat.stat.exists | bool @@ -20,7 +20,7 @@ enabled: false daemon_reload: true - - name: Ensure matrix-bridge-zulip.service doesn't exist + - name: Ensure matrix-zulip-bridge.service doesn't exist ansible.builtin.file: - path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bridge-zulip.service" + path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-zulip-bridge.service" state: absent diff --git a/roles/custom/matrix-bridge-zulip/templates/labels.j2 b/roles/custom/matrix-bridge-zulip/templates/labels.j2 index 6c853a299..a41889f71 100644 --- a/roles/custom/matrix-bridge-zulip/templates/labels.j2 +++ b/roles/custom/matrix-bridge-zulip/templates/labels.j2 @@ -11,7 +11,7 @@ traefik.enable=true traefik.docker.network={{ matrix_zulip_bridge_container_labels_traefik_docker_network }} {% endif %} -traefik.http.services.matrix-bridge-zulip.loadbalancer.server.port={{ matrix_zulip_bridge_container_http_port }} +traefik.http.services.matrix-zulip-bridge.loadbalancer.server.port={{ matrix_zulip_bridge_container_http_port }} {% set middlewares = [] %} diff --git a/roles/custom/matrix-bridge-zulip/templates/systemd/matrix-matrixzulipbridge.service.j2 b/roles/custom/matrix-bridge-zulip/templates/systemd/matrix-zulip-bridge.service.j2 similarity index 100% rename from roles/custom/matrix-bridge-zulip/templates/systemd/matrix-matrixzulipbridge.service.j2 rename to roles/custom/matrix-bridge-zulip/templates/systemd/matrix-zulip-bridge.service.j2