Просмотр исходного кода

MatrixZulipBridge → Zulip bridge

Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
pull/4695/head
Suguru Hirahara 4 месяцев назад
Родитель
Сommit
bcce68da1f
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: E4F9743DAB4B7B75
6 измененных файлов: 19 добавлений и 19 удалений
  1. +6
    -6
      docs/configuring-playbook-bridge-zulip.md
  2. +1
    -1
      docs/configuring-playbook.md
  3. +1
    -1
      roles/custom/matrix-bridge-zulip/defaults/main.yml
  4. +5
    -5
      roles/custom/matrix-bridge-zulip/tasks/main.yml
  5. +5
    -5
      roles/custom/matrix-bridge-zulip/tasks/setup_install.yml
  6. +1
    -1
      roles/custom/matrix-bridge-zulip/tasks/validate_config.yml

+ 6
- 6
docs/configuring-playbook-bridge-zulip.md Просмотреть файл

@@ -6,7 +6,7 @@ SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
SPDX-License-Identifier: AGPL-3.0-or-later SPDX-License-Identifier: AGPL-3.0-or-later
--> -->


# Setting up MatrixZulipBridge (optional)
# Setting up a Zulip bridge (optional)


The playbook can install and configure [MatrixZulipBridge](https://github.com/GearKite/MatrixZulipBridge) for you. The playbook can install and configure [MatrixZulipBridge](https://github.com/GearKite/MatrixZulipBridge) for you.


@@ -14,13 +14,13 @@ See the project's [documentation](https://github.com/GearKite/MatrixZulipBridge/


## Adjusting DNS records (optional) ## Adjusting DNS records (optional)


By default, this playbook installs MatrixZulipBridge on the `matrix.` subdomain, at the `/zulip` path (https://matrix.example.com/zulip). This makes it easy to install it, because it **doesn't require additional DNS records to be set up**. If that's okay, you can skip this section.
By default, this playbook installs the Zulip bridge on the `matrix.` subdomain, at the `/zulip` path (https://matrix.example.com/zulip). This makes it easy to install it, because it **doesn't require additional DNS records to be set up**. If that's okay, you can skip this section.


If you wish to adjust it, see the section [below](#adjusting-the-matrixzulipbridge-url-optional) for details about DNS configuration.
If you wish to adjust it, see the section [below](#adjusting-the-zulip-bridge-url-optional) for details about DNS configuration.


## Adjusting the playbook configuration ## Adjusting the playbook configuration


To enable MatrixZulipBridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
To enable the Zulip bridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:


```yaml ```yaml
matrix_bridge_zulip_enabled: true matrix_bridge_zulip_enabled: true
@@ -30,7 +30,7 @@ matrix_bridge_zulip_enabled: true
matrix_bridge_zulip_owner: "@alice:{{ matrix_domain }}" matrix_bridge_zulip_owner: "@alice:{{ matrix_domain }}"
``` ```


### Adjusting the MatrixZulipBridge URL (optional)
### Adjusting the Zulip bridge URL (optional)


By tweaking the `matrix_bridge_zulip_hostname` and `matrix_bridge_zulip_path_prefix` variables, you can easily make the service available at a **different hostname and/or path** than the default one. By tweaking the `matrix_bridge_zulip_hostname` and `matrix_bridge_zulip_path_prefix` variables, you can easily make the service available at a **different hostname and/or path** than the default one.


@@ -42,7 +42,7 @@ matrix_bridge_zulip_hostname: zulip.example.com
matrix_bridge_zulip_path_prefix: / matrix_bridge_zulip_path_prefix: /
``` ```


If you've changed the default hostname, you may need to create a CNAME record for the MatrixZulipBridge domain (`zulip.example.com`), which targets `matrix.example.com`.
If you've changed the default hostname, you may need to create a CNAME record for the Zulip bridge domain (`zulip.example.com`), which targets `matrix.example.com`.


When setting, replace `example.com` with your own. When setting, replace `example.com` with your own.




+ 1
- 1
docs/configuring-playbook.md Просмотреть файл

@@ -194,7 +194,7 @@ Bridges can be used to connect your Matrix installation with third-party communi


- [Setting up Matrix SMS bridging](configuring-playbook-bridge-matrix-bridge-sms.md) - [Setting up Matrix SMS bridging](configuring-playbook-bridge-matrix-bridge-sms.md)


- [Setting up MatrixZulipBridge](configuring-playbook-bridge-zulip.md)
- [Setting up Zulip bridging](configuring-playbook-bridge-zulip.md)


- [Setting up Heisenbridge bouncer-style IRC bridging](configuring-playbook-bridge-heisenbridge.md) - [Setting up Heisenbridge bouncer-style IRC bridging](configuring-playbook-bridge-heisenbridge.md)




+ 1
- 1
roles/custom/matrix-bridge-zulip/defaults/main.yml Просмотреть файл

@@ -106,7 +106,7 @@ matrix_bridge_zulip_registration_yaml_bridge_zulip:
displayname: "{{ matrix_bridge_zulip_config_displayname }}" displayname: "{{ matrix_bridge_zulip_config_displayname }}"


# Default registration file consumed by both the homeserver and MatrixZulipBridge. # Default registration file consumed by both the homeserver and MatrixZulipBridge.
# Besides registration information, it contains configuration (see the MatrixZulipBridge key).
# Besides registration information, it contains configuration (see the Zulip bridge key).
matrix_bridge_zulip_registration_yaml: matrix_bridge_zulip_registration_yaml:
id: zulipbridge id: zulipbridge
url: http://matrix-bridge-zulip:{{ matrix_bridge_zulip_container_http_port }} url: http://matrix-bridge-zulip:{{ matrix_bridge_zulip_container_http_port }}


+ 5
- 5
roles/custom/matrix-bridge-zulip/tasks/main.yml Просмотреть файл

@@ -6,7 +6,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later


--- ---
- name: Perform MatrixZulipBridge installation tasks
- name: Perform the Zulip bridge installation tasks
when: matrix_bridge_zulip_enabled | bool when: matrix_bridge_zulip_enabled | bool
tags: tags:
- setup-all - setup-all
@@ -14,16 +14,16 @@
- install-all - install-all
- install-bridge-zulip - install-bridge-zulip
block: block:
- name: Validate MatrixZulipBridge configuration
- name: Validate the Zulip bridge configuration
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
- name: Install MatrixZulipBridge
- name: Install the Zulip bridge
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"


- name: Perform MatrixZulipBridge uninstallation tasks
- name: Perform the Zulip bridge uninstallation tasks
when: not matrix_bridge_zulip_enabled | bool when: not matrix_bridge_zulip_enabled | bool
tags: tags:
- setup-all - setup-all
- setup-bridge-zulip - setup-bridge-zulip
block: block:
- name: Uninstall MatrixZulipBridge
- name: Uninstall the Zulip bridge
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"

+ 5
- 5
roles/custom/matrix-bridge-zulip/tasks/setup_install.yml Просмотреть файл

@@ -9,7 +9,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later


--- ---
- name: Ensure MatrixZulipBridge image is pulled
- name: Ensure the Zulip bridge image is pulled
community.docker.docker_image: community.docker.docker_image:
name: "{{ matrix_bridge_zulip_docker_image }}" name: "{{ matrix_bridge_zulip_docker_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
@@ -20,7 +20,7 @@
delay: "{{ devture_playbook_help_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed


- name: Ensure MatrixZulipBridge paths exist
- name: Ensure the Zulip bridge paths exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
@@ -30,7 +30,7 @@
with_items: with_items:
- "{{ matrix_bridge_zulip_base_path }}" - "{{ matrix_bridge_zulip_base_path }}"


- name: Ensure MatrixZulipBridge registration.yaml installed if provided
- name: Ensure the Zulip bridge registration.yaml installed if provided
ansible.builtin.copy: ansible.builtin.copy:
content: "{{ matrix_bridge_zulip_registration | to_nice_yaml(indent=2, width=999999) }}" content: "{{ matrix_bridge_zulip_registration | to_nice_yaml(indent=2, width=999999) }}"
dest: "{{ matrix_bridge_zulip_base_path }}/registration.yaml" dest: "{{ matrix_bridge_zulip_base_path }}/registration.yaml"
@@ -38,7 +38,7 @@
owner: "{{ matrix_user_name }}" owner: "{{ matrix_user_name }}"
group: "{{ matrix_group_name }}" group: "{{ matrix_group_name }}"


- name: Ensure MatrixZulipBridge support files installed
- name: Ensure the Zulip bridge support files installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/{{ item }}.j2" src: "{{ role_path }}/templates/{{ item }}.j2"
dest: "{{ matrix_bridge_zulip_base_path }}/{{ item }}" dest: "{{ matrix_bridge_zulip_base_path }}/{{ item }}"
@@ -48,7 +48,7 @@
with_items: with_items:
- labels - labels


- name: Ensure MatrixZulipBridge container network is created
- name: Ensure the Zulip bridge container network is created
community.general.docker_network: community.general.docker_network:
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}" enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
name: "{{ matrix_bridge_zulip_container_network }}" name: "{{ matrix_bridge_zulip_container_network }}"


+ 1
- 1
roles/custom/matrix-bridge-zulip/tasks/validate_config.yml Просмотреть файл

@@ -4,7 +4,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later


--- ---
- name: Fail if required MatrixZulipBridge settings not defined
- name: Fail if required the Zulip bridge settings not defined
ansible.builtin.fail: ansible.builtin.fail:
msg: >- msg: >-
You need to define a required configuration setting (`{{ item.name }}`). You need to define a required configuration setting (`{{ item.name }}`).


Загрузка…
Отмена
Сохранить