From 386d94a8f614ee85c889fd79767385979a0efa2b Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sun, 9 Nov 2025 13:31:48 +0900 Subject: [PATCH] Remove matrix-bridge-appservice-webhooks Reuse: - https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/1861faf31d5490c6604efdd34d83073ec3850d88/docs/configuring-playbook-bridge-mx-puppet-twitter.md - 2b7a0453eb33d7026dfdcb20619d4a73a9727f5b Signed-off-by: Suguru Hirahara --- CHANGELOG.md | 8 + ...ing-playbook-bridge-appservice-webhooks.md | 109 ++------------ docs/configuring-playbook-bridge-hookshot.md | 6 - docs/container-images.md | 2 +- docs/self-building.md | 1 - group_vars/matrix_servers | 64 -------- .../defaults/main.yml | 139 ------------------ .../tasks/main.yml | 26 ---- .../tasks/setup_install.yml | 117 --------------- .../tasks/setup_uninstall.yml | 27 ---- .../tasks/validate_config.yml | 32 ---- .../templates/config.yaml.j2 | 28 ---- .../templates/config.yaml.j2.license | 3 - .../templates/database.json.j2 | 13 -- .../templates/database.json.j2.license | 4 - .../templates/labels.j2 | 50 ------- .../templates/schema.yml.j2 | 54 ------- .../templates/schema.yml.j2.license | 4 - .../matrix-appservice-webhooks.service.j2 | 51 ------- ...rix-appservice-webhooks.service.j2.license | 8 - .../tasks/validate_config.yml | 12 ++ setup.yml | 1 - 22 files changed, 34 insertions(+), 725 deletions(-) delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/defaults/main.yml delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/tasks/main.yml delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_install.yml delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_uninstall.yml delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/tasks/validate_config.yml delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2 delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2.license delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2 delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2.license delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/labels.j2 delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2 delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2.license delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 delete mode 100644 roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2.license diff --git a/CHANGELOG.md b/CHANGELOG.md index 39d1fd8ae..42ce31cab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 2025-11-09 + +## matrix-appservice-webhooks has been removed from the playbook + +[matrix-appservice-webhooks](./docs/configuring-playbook-bridge-appservice-webhooks.md) has been removed from the playbook, as it has been deprecated since more than several years. + +The playbook will let you know if you're using any `matrix_appservice_webhooks_*` variables. You'll need to remove them from `vars.yml` and potentially [uninstall the bridge manually](./docs/configuring-playbook-bridge-appservice-webhooks.md#uninstalling-the-bridge-manually). + # 2025-11-08 Thanks to [Suguru Hirahara](https://github.com/luixxiul), the playbook now supports the [GearKite/MatrixZulipBridg](https://github.com/GearKite/MatrixZulipBridg) bridge for bridging Matrix to [Zulip](https://zulip.com/). diff --git a/docs/configuring-playbook-bridge-appservice-webhooks.md b/docs/configuring-playbook-bridge-appservice-webhooks.md index 9c43811f7..03e24af9c 100644 --- a/docs/configuring-playbook-bridge-appservice-webhooks.md +++ b/docs/configuring-playbook-bridge-appservice-webhooks.md @@ -1,113 +1,30 @@ -# Setting up Appservice Webhooks bridging (optional, deprecated) +# Setting up Appservice Webhooks bridging (optional, removed) -**Note**: This bridge has been deprecated. We recommend not bothering with installing it. While not a 1:1 replacement, the bridge's author suggests taking a look at [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) as a replacement, which can also be [installed using this playbook](configuring-playbook-bridge-hookshot.md). Consider using that bridge instead of this one. +🪦 The playbook used to be able to install and configure [matrix-appservice-webhooks](https://github.com/turt2live/matrix-appservice-webhooks), but no longer includes this component, as it has been deprecated since more than several years. -The playbook can install and configure [matrix-appservice-webhooks](https://github.com/turt2live/matrix-appservice-webhooks) for you. This bridge provides support for Slack-compatible webhooks. +You may wish to use [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) instead. -See the project's [documentation](https://github.com/turt2live/matrix-appservice-webhooks/blob/master/README.md) to learn what it does and why it might be useful to you. +## Uninstalling the bridge manually -## Adjusting the playbook configuration - -To enable the bridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file: - -```yaml -matrix_appservice_webhooks_enabled: true -matrix_appservice_webhooks_api_secret: '' - -# As of Synapse 1.90.0, uncomment to enable the backwards compatibility (https://matrix-org.github.io/synapse/latest/upgrade#upgrading-to-v1900) that this bridge needs. -# Note: This deprecated method is considered insecure. -# -# matrix_synapse_configuration_extension_yaml: | -# use_appservice_legacy_authorization: true -``` - -### Extending the configuration - -There are some additional things you may wish to configure about the bridge. - -Take a look at: - -- `roles/custom/matrix-bridge-appservice-webhooks/defaults/main.yml` for some variables that you can customize via your `vars.yml` file -- `roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_appservice_webhooks_configuration_extension_yaml` variable - -## Installing - -After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below: - - -```sh -ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start -``` - -The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all` - -`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too. - -## Usage - -To use the bridge, you need to invite the bridge bot user to your room in either way. - -- Send `/invite @_webhook:example.com` (**Note**: Make sure you have administration permissions in your room) -- Add the bridge bot to a private channel (personal channels imply you being an administrator) - -You then need to send a message to the bridge bot to receive a private message including the webhook link: - -``` -!webhook -``` - -The JSON body for posting messages will have to look like this: - -```json -{ - "text": "Hello world!", - "format": "plain", - "displayName": "My Cool Webhook", - "avatar_url": "http://i.imgur.com/IDOBtEJ.png" -} -``` - -You can test this via curl like so: +If you still have matrix-appservice-webhooks installed on your Matrix server, the playbook can no longer help you uninstall it and you will need to do it manually. To uninstall manually, run these commands on the server: ```sh -curl --header "Content-Type: application/json" \ ---data '{ -"text": "Hello world!", -"format": "plain", -"displayName": "My Cool Webhook", -"avatar_url": "http://i.imgur.com/IDOBtEJ.png" -}' \ - -``` - -### Setting Webhooks with Dimension integration manager - -If you're using the [Dimension integration manager](configuring-playbook-dimension.md), you can configure the Webhooks bridge with it. - -To configure it, open the Dimension integration manager, and go to "Settings" and "Bridges", then select edit action for "Webhook Bridge". - -On the UI, press "Add self-hosted Bridge" button and populate "Provisioning URL" and "Shared Secret" values from `/matrix/appservice-webhooks/config/config.yaml` file's homeserver URL value and provisioning secret value, respectively. - -## Troubleshooting - -As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-appservice-webhooks`. - -### Increase logging verbosity - -The default logging level for this component is `info`. If you want to increase the verbosity, add the following configuration to your `vars.yml` file and re-run the playbook: - -```yaml -# Valid values: info, verbose -matrix_appservice_webhooks_log_level: 'verbose' +systemctl disable --now matrix-appservice-webhooks.service + +rm -rf /matrix/appservice-webhooks ``` diff --git a/docs/configuring-playbook-bridge-hookshot.md b/docs/configuring-playbook-bridge-hookshot.md index 210feac84..021558ddc 100644 --- a/docs/configuring-playbook-bridge-hookshot.md +++ b/docs/configuring-playbook-bridge-hookshot.md @@ -16,8 +16,6 @@ Hookshot can bridge [Webhooks](https://en.wikipedia.org/wiki/Webhook) from softw See the project's [documentation](https://matrix-org.github.io/matrix-hookshot/latest/hookshot.html) to learn what it does and why it might be useful to you. -**Note**: the playbook also supports [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md), which however was deprecated by its author. - ## Prerequisites ### Download GitHub app private key (optional) @@ -131,10 +129,6 @@ aux_file_definitions: For more information, see the documentation in the [default configuration of the aux role](https://github.com/mother-of-all-self-hosting/ansible-role-aux/blob/main/defaults/main.yml). -### Collision with matrix-appservice-webhooks - -If you are also running [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md), it reserves its namespace by the default setting `matrix_appservice_webhooks_user_prefix: '_webhook_'`. You should take care if you modify its or hookshot's prefix that they do not collide with each other's namespace (default `matrix_hookshot_generic_userIdPrefix: '_webhooks_'`). - ### Enable metrics The playbook can enable and configure the metrics of the service for you. diff --git a/docs/container-images.md b/docs/container-images.md index f7a548343..cd38e917c 100644 --- a/docs/container-images.md +++ b/docs/container-images.md @@ -175,10 +175,10 @@ The list of the deprecated or unmaintained services is available [here](configur | Service | Container image | Default? | Description | | ------- | --------------- | -------- | ----------- | -| [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md) | [turt2live/matrix-appservice-webhooks](https://hub.docker.com/r/turt2live/matrix-appservice-webhooks) | ❌ | Bridge for slack compatible webhooks ([ConcourseCI](https://concourse-ci.org/), [Slack](https://slack.com/) etc. pp.) | | [Dimension](configuring-playbook-dimension.md) | [turt2live/matrix-dimension](https://hub.docker.com/r/turt2live/matrix-dimension) | ❌ | Open source integration manager for Matrix clients | | [Email2Matrix](configuring-playbook-email2matrix.md) | [devture/email2matrix](https://hub.docker.com/r/devture/email2matrix/) | ❌ | Bridge for relaying emails to Matrix rooms | | [Go-NEB](configuring-playbook-bot-go-neb.md) | [matrixdotorg/go-neb](https://hub.docker.com/r/matrixdotorg/go-neb) | ❌ | Multi functional bot written in Go | +| [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md) | [turt2live/matrix-appservice-webhooks](https://hub.docker.com/r/turt2live/matrix-appservice-webhooks) | ❌ | Bridge for slack compatible webhooks ([ConcourseCI](https://concourse-ci.org/), [Slack](https://slack.com/) etc. pp.) | | [matrix-chatgpt-bot](configuring-playbook-bot-chatgpt.md) | [matrixgpt/matrix-chatgpt-bot](https://ghcr.io/matrixgpt/matrix-chatgpt-bot) | ❌ | Accessing ChatGPT via your favourite Matrix client | | [mautrix-facebook](configuring-playbook-bridge-mautrix-facebook.md) | [mautrix/facebook](https://mau.dev/mautrix/facebook/container_registry) | ❌ | Bridge to [Facebook](https://facebook.com/) | | [mautrix-instagram](configuring-playbook-bridge-mautrix-instagram.md) | [mautrix/instagram](https://mau.dev/mautrix/instagram/container_registry) | ❌ | Bridge to [Instagram](https://instagram.com/) | diff --git a/docs/self-building.md b/docs/self-building.md index d1aa855b7..997f91adb 100644 --- a/docs/self-building.md +++ b/docs/self-building.md @@ -39,7 +39,6 @@ Possibly outdated list of roles where self-building the Docker image is currentl - `matrix-bridge-hookshot` - `matrix-bridge-appservice-irc` - `matrix-bridge-appservice-slack` -- `matrix-bridge-appservice-webhooks` - `matrix-bridge-beeper-linkedin` - `matrix-bridge-mautrix-facebook` - `matrix-bridge-mautrix-googlechat` diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index d4f24739f..a1c11cfde 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -106,8 +106,6 @@ matrix_homeserver_container_extra_arguments_auto: | + (['--mount type=bind,src=' + matrix_appservice_slack_config_path + '/slack-registration.yaml,dst=/matrix-appservice-slack-registration.yaml,ro'] if matrix_appservice_slack_enabled else []) + - (['--mount type=bind,src=' + matrix_appservice_webhooks_config_path + '/webhooks-registration.yaml,dst=/matrix-appservice-webhooks-registration.yaml,ro'] if matrix_appservice_webhooks_enabled else []) - + (['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else []) + (['--mount type=bind,src=' + matrix_wechat_config_path + '/registration.yaml,dst=/matrix-wechat-registration.yaml,ro'] if matrix_wechat_enabled else []) @@ -173,8 +171,6 @@ matrix_homeserver_app_service_config_files_auto: | + (['/matrix-appservice-slack-registration.yaml'] if matrix_appservice_slack_enabled else []) + - (['/matrix-appservice-webhooks-registration.yaml'] if matrix_appservice_webhooks_enabled else []) - + (['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else []) + (['/matrix-wechat-registration.yaml'] if matrix_wechat_enabled else []) @@ -307,8 +303,6 @@ devture_systemd_service_manager_services_list_auto: | + ([{'name': 'matrix-appservice-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-slack']}] if matrix_appservice_slack_enabled else []) + - ([{'name': 'matrix-appservice-webhooks.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-webhooks']}] if matrix_appservice_webhooks_enabled else []) - + ([{'name': 'matrix-beeper-linkedin.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'beeper-linkedin']}] if matrix_beeper_linkedin_enabled else []) + ([{'name': 'matrix-wechat.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'wechat']}] if matrix_wechat_enabled else []) @@ -768,59 +762,6 @@ matrix_appservice_discord_database_password: "{{ '%s' | format(matrix_homeserver # ###################################################################### - -###################################################################### -# -# matrix-appservice-webhooks -# -###################################################################### - -# We don't enable bridges by default. -matrix_appservice_webhooks_enabled: false - -matrix_appservice_webhooks_hostname: "{{ matrix_server_fqn_matrix }}" - -matrix_appservice_webhooks_systemd_required_services_list_auto: | - {{ - matrix_addons_homeserver_systemd_services_list - }} - -matrix_appservice_webhooks_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_webhooks_docker_image_registry_prefix_upstream_default }}" - -matrix_appservice_webhooks_container_image_self_build: "{{ matrix_architecture != 'amd64' }}" - -matrix_appservice_webhooks_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ matrix_appservice_webhooks_matrix_port) if matrix_playbook_service_host_bind_interface_prefix else '' }}" - -matrix_appservice_webhooks_container_network: "{{ matrix_addons_container_network }}" - -matrix_appservice_webhooks_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_playbook_reverse_proxyable_services_additional_network and matrix_appservice_webhooks_container_labels_traefik_enabled) else []) - ) | unique - }} - -matrix_appservice_webhooks_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}" -matrix_appservice_webhooks_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}" -matrix_appservice_webhooks_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}" -matrix_appservice_webhooks_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" - -matrix_appservice_webhooks_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.as.token', rounds=655555) | to_uuid }}" - -matrix_appservice_webhooks_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}" -matrix_appservice_webhooks_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.hs.token', rounds=655555) | to_uuid }}" - -matrix_appservice_webhooks_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.id.token', rounds=655555) | to_uuid }}" - -###################################################################### -# -# /matrix-appservice-webhooks -# -###################################################################### - - ###################################################################### # # matrix-appservice-slack @@ -4961,11 +4902,6 @@ matrix_synapse_admin_config_asManagedUsers_auto: | '^@'+(matrix_appservice_slack_user_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$', ] if matrix_appservice_slack_enabled else []) + - ([ - '^@'+(matrix_appservice_webhooks_bot_name | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$', - '^@'+(matrix_appservice_webhooks_user_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$', - ] if matrix_appservice_webhooks_enabled else []) - + ([ '^@'+(matrix_beeper_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$', '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$', diff --git a/roles/custom/matrix-bridge-appservice-webhooks/defaults/main.yml b/roles/custom/matrix-bridge-appservice-webhooks/defaults/main.yml deleted file mode 100644 index b90735561..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/defaults/main.yml +++ /dev/null @@ -1,139 +0,0 @@ -# SPDX-FileCopyrightText: 2020 - 2025 Slavi Pantaleev -# SPDX-FileCopyrightText: 2020 Björn Marten -# SPDX-FileCopyrightText: 2020 David Gnedt -# SPDX-FileCopyrightText: 2021 - 2023 MDAD project contributors -# SPDX-FileCopyrightText: 2021 Ahmad Haghighi -# SPDX-FileCopyrightText: 2021 Béla Becker -# SPDX-FileCopyrightText: 2021 boris runakov -# SPDX-FileCopyrightText: 2022 Marko Weltzer -# SPDX-FileCopyrightText: 2022 Nikita Chernyi -# SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara -# -# SPDX-License-Identifier: AGPL-3.0-or-later - ---- -# matrix-appservice-webhooks is a Matrix <-> webhook bridge -# Project source code URL: https://github.com/redoonetworks/matrix-appservice-webhooks - -matrix_appservice_webhooks_enabled: true - -matrix_appservice_webhooks_scheme: https -matrix_appservice_webhooks_hostname: '' -matrix_appservice_webhooks_path_prefix: /appservice-webhooks - -matrix_appservice_webhooks_container_image_self_build: false -matrix_appservice_webhooks_container_image_self_build_repo: "https://github.com/redoonetworks/matrix-appservice-webhooks" -matrix_appservice_webhooks_container_image_self_build_repo_version: "{{ 'master' if matrix_appservice_webhooks_version == 'latest' else matrix_appservice_webhooks_version }}" -matrix_appservice_webhooks_container_image_self_build_repo_dockerfile_path: "Dockerfile" - -matrix_appservice_webhooks_version: v1.0.3-01 -matrix_appservice_webhooks_docker_image: "{{ matrix_appservice_webhooks_docker_image_registry_prefix }}redoonetworks/matrix-appservice-webhooks:{{ matrix_appservice_webhooks_version }}" -matrix_appservice_webhooks_docker_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_webhooks_container_image_self_build else matrix_appservice_webhooks_docker_image_registry_prefix_upstream }}" -matrix_appservice_webhooks_docker_image_registry_prefix_upstream: "{{ matrix_appservice_webhooks_docker_image_registry_prefix_upstream_default }}" -matrix_appservice_webhooks_docker_image_registry_prefix_upstream_default: "docker.io/" -matrix_appservice_webhooks_docker_image_force_pull: "{{ matrix_appservice_webhooks_docker_image.endswith(':latest') }}" - -matrix_appservice_webhooks_base_path: "{{ matrix_base_data_path }}/appservice-webhooks" -matrix_appservice_webhooks_config_path: "{{ matrix_appservice_webhooks_base_path }}/config" -matrix_appservice_webhooks_data_path: "{{ matrix_appservice_webhooks_base_path }}/data" -matrix_appservice_webhooks_docker_src_files_path: "{{ matrix_appservice_webhooks_base_path }}/docker-src" - -# If nginx-proxy is disabled, the bridge itself expects its endpoint to be on its own domain (e.g. "localhost:6789") -matrix_appservice_webhooks_public_endpoint: "{{ matrix_appservice_webhooks_path_prefix }}" -matrix_appservice_webhooks_inbound_uri_prefix: "{{ matrix_appservice_webhooks_scheme }}://{{ matrix_appservice_webhooks_hostname }}{{ matrix_appservice_webhooks_public_endpoint }}" - -matrix_appservice_webhooks_bot_name: 'webhookbot' -matrix_appservice_webhooks_user_prefix: '_webhook_' - -# Controls the webhooks_PORT and MATRIX_PORT of the installation -matrix_appservice_webhooks_matrix_port: 6789 - -# Controls whether the appservice-webhooks container exposes its HTTP port (tcp/6789 in the container). -# -# Takes an ":" or "" value (e.g. "127.0.0.1:9999"), or empty string to not expose. -matrix_appservice_webhooks_container_http_host_bind_port: '' - -matrix_appservice_webhooks_container_network: "" - -matrix_appservice_webhooks_container_additional_networks: "{{ matrix_appservice_webhooks_container_additional_networks_auto + matrix_appservice_webhooks_container_additional_networks_custom }}" -matrix_appservice_webhooks_container_additional_networks_auto: [] -matrix_appservice_webhooks_container_additional_networks_custom: [] - -# matrix_appservice_webhooks_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container. -# See `../templates/labels.j2` for details. -# -# To inject your own other container labels, see `matrix_appservice_webhooks_container_labels_additional_labels`. -matrix_appservice_webhooks_container_labels_traefik_enabled: true -matrix_appservice_webhooks_container_labels_traefik_docker_network: "{{ matrix_appservice_webhooks_container_network }}" -matrix_appservice_webhooks_container_labels_traefik_entrypoints: web-secure -matrix_appservice_webhooks_container_labels_traefik_tls_certResolver: default # noqa var-naming - -# Controls whether labels will be added that expose matrix-appservice-webhook's public endpoints -matrix_appservice_webhooks_container_labels_public_endpoint_enabled: true -matrix_appservice_webhooks_container_labels_public_endpoint_hostname: "{{ matrix_appservice_webhooks_hostname }}" -matrix_appservice_webhooks_container_labels_public_endpoint_prefix: "{{ matrix_appservice_webhooks_path_prefix }}" -matrix_appservice_webhooks_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_appservice_webhooks_container_labels_public_endpoint_hostname }}`) && PathPrefix(`{{ matrix_appservice_webhooks_path_prefix }}`)" -matrix_appservice_webhooks_container_labels_public_endpoint_traefik_priority: 0 -matrix_appservice_webhooks_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_appservice_webhooks_container_labels_traefik_entrypoints }}" -matrix_appservice_webhooks_container_labels_public_endpoint_traefik_tls: "{{ matrix_appservice_webhooks_container_labels_public_endpoint_traefik_entrypoints != 'web' }}" -matrix_appservice_webhooks_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_appservice_webhooks_container_labels_traefik_tls_certResolver }}" # noqa var-naming - -# matrix_appservice_webhooks_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file. -# See `../templates/labels.j2` for details. -# -# Example: -# matrix_appservice_webhooks_container_labels_additional_labels: | -# my.label=1 -# another.label="here" -matrix_appservice_webhooks_container_labels_additional_labels: '' - -# A list of extra arguments to pass to the container -matrix_appservice_webhooks_container_extra_arguments: [] - -# List of systemd services that matrix-appservice-webhooks.service depends on. -matrix_appservice_webhooks_systemd_required_services_list: "{{ matrix_appservice_webhooks_systemd_required_services_list_default + matrix_appservice_webhooks_systemd_required_services_list_auto + matrix_appservice_webhooks_systemd_required_services_list_custom }}" -matrix_appservice_webhooks_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}" -matrix_appservice_webhooks_systemd_required_services_list_auto: [] -matrix_appservice_webhooks_systemd_required_services_list_custom: [] - -# List of systemd services that matrix-appservice-webhooks.service wants -matrix_appservice_webhooks_systemd_wanted_services_list: [] - -matrix_appservice_webhooks_homeserver_media_url: "{{ matrix_server_fqn_matrix }}" -matrix_appservice_webhooks_homeserver_url: "" -matrix_appservice_webhooks_homeserver_domain: "{{ matrix_domain }}" -matrix_appservice_webhooks_appservice_url: 'http://matrix-appservice-webhooks' - -matrix_appservice_webhooks_appservice_token: '' -matrix_appservice_webhooks_homeserver_token: '' -matrix_appservice_webhooks_id_token: '' -matrix_appservice_webhooks_api_secret: '' - -# Valid values: info, verbose -matrix_appservice_webhooks_log_level: 'info' - -matrix_appservice_webhooks_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}" - -matrix_appservice_webhooks_configuration_extension_yaml: | - # - -matrix_appservice_webhooks_configuration_extension: "{{ matrix_appservice_webhooks_configuration_extension_yaml | from_yaml if matrix_appservice_webhooks_configuration_extension_yaml | from_yaml else {} }}" - -matrix_appservice_webhooks_configuration: "{{ matrix_appservice_webhooks_configuration_yaml | from_yaml | combine(matrix_appservice_webhooks_configuration_extension, recursive=True) }}" - -matrix_appservice_webhooks_registration_yaml: | - id: "{{ matrix_appservice_webhooks_id_token }}" - hs_token: "{{ matrix_appservice_webhooks_homeserver_token }}" - as_token: "{{ matrix_appservice_webhooks_appservice_token }}" - namespaces: - users: - - exclusive: true - regex: '^@{{ matrix_appservice_webhooks_user_prefix | regex_escape }}.*:{{ matrix_domain | regex_escape }}$' - aliases: [] - rooms: [] - url: "{{ matrix_appservice_webhooks_appservice_url }}:{{ matrix_appservice_webhooks_matrix_port }}" - sender_localpart: _webhook - rate_limited: false - protocols: null - -matrix_appservice_webhooks_registration: "{{ matrix_appservice_webhooks_registration_yaml | from_yaml }}" diff --git a/roles/custom/matrix-bridge-appservice-webhooks/tasks/main.yml b/roles/custom/matrix-bridge-appservice-webhooks/tasks/main.yml deleted file mode 100644 index bc6a17105..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/tasks/main.yml +++ /dev/null @@ -1,26 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Björn Marten -# SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev -# SPDX-FileCopyrightText: 2022 Marko Weltzer -# -# SPDX-License-Identifier: AGPL-3.0-or-later - ---- - -- tags: - - setup-all - - setup-appservice-webhooks - - install-all - - install-appservice-webhooks - block: - - when: matrix_appservice_webhooks_enabled | bool - ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml" - - - when: matrix_appservice_webhooks_enabled | bool - ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml" - -- tags: - - setup-all - - setup-appservice-webhooks - block: - - when: not matrix_appservice_webhooks_enabled | bool - ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" diff --git a/roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_install.yml b/roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_install.yml deleted file mode 100644 index a68bbc805..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_install.yml +++ /dev/null @@ -1,117 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Björn Marten -# SPDX-FileCopyrightText: 2020 Chris van Dijk -# SPDX-FileCopyrightText: 2020 MDAD project contributors -# SPDX-FileCopyrightText: 2021 - 2024 Slavi Pantaleev -# SPDX-FileCopyrightText: 2022 Jim Myhrberg -# SPDX-FileCopyrightText: 2022 Marko Weltzer -# SPDX-FileCopyrightText: 2022 Nikita Chernyi -# SPDX-FileCopyrightText: 2022 Sebastian Gumprich -# SPDX-FileCopyrightText: 2024 David Mehren -# -# SPDX-License-Identifier: AGPL-3.0-or-later - ---- - -- name: Ensure matrix-appservice-webhooks paths exist - ansible.builtin.file: - path: "{{ item.path }}" - state: directory - mode: 0750 - owner: "{{ matrix_user_name }}" - group: "{{ matrix_group_name }}" - with_items: - - {path: "{{ matrix_appservice_webhooks_base_path }}", when: true} - - {path: "{{ matrix_appservice_webhooks_config_path }}", when: true} - - {path: "{{ matrix_appservice_webhooks_data_path }}", when: true} - - {path: "{{ matrix_appservice_webhooks_docker_src_files_path }}", when: "{{ matrix_appservice_webhooks_container_image_self_build }}"} - when: "item.when | bool" - -- name: Ensure matrix-appservice-webhooks container image is pulled - community.docker.docker_image: - name: "{{ matrix_appservice_webhooks_docker_image }}" - source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" - force_source: "{{ matrix_appservice_webhooks_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" - force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_webhooks_docker_image_force_pull }}" - when: "not matrix_appservice_webhooks_container_image_self_build | bool" - register: result - retries: "{{ devture_playbook_help_container_retries_count }}" - delay: "{{ devture_playbook_help_container_retries_delay }}" - until: result is not failed - -- when: "matrix_appservice_webhooks_container_image_self_build | bool" - block: - - name: Ensure matrix-appservice-webhooks repository is present on self-build - ansible.builtin.git: - repo: "{{ matrix_appservice_webhooks_container_image_self_build_repo }}" - dest: "{{ matrix_appservice_webhooks_docker_src_files_path }}" - version: "{{ matrix_appservice_webhooks_container_image_self_build_repo_version }}" - force: "yes" - become: true - become_user: "{{ matrix_user_name }}" - register: matrix_appservice_webhooks_git_pull_results - - - name: Ensure matrix-appservice-webhooks container image is built - community.docker.docker_image: - name: "{{ matrix_appservice_webhooks_docker_image }}" - source: build - force_source: "{{ matrix_appservice_webhooks_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" - force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_webhooks_git_pull_results.changed }}" - build: - dockerfile: "{{ matrix_appservice_webhooks_container_image_self_build_repo_dockerfile_path }}" - path: "{{ matrix_appservice_webhooks_docker_src_files_path }}" - pull: true - -- name: Ensure matrix-appservice-webhooks config is installed - ansible.builtin.copy: - content: "{{ matrix_appservice_webhooks_configuration | to_nice_yaml(indent=2, width=999999) }}" - dest: "{{ matrix_appservice_webhooks_config_path }}/config.yaml" - mode: 0644 - owner: "{{ matrix_user_name }}" - group: "{{ matrix_group_name }}" - -- name: Ensure matrix-appservice-webhooks schema.yml template exists - ansible.builtin.template: - src: "{{ role_path }}/templates/schema.yml.j2" - dest: "{{ matrix_appservice_webhooks_config_path }}/schema.yml" - mode: 0644 - owner: "{{ matrix_user_name }}" - group: "{{ matrix_group_name }}" - -- name: Ensure matrix-appservice-webhooks database.json template exists - ansible.builtin.template: - src: "{{ role_path }}/templates/database.json.j2" - dest: "{{ matrix_appservice_webhooks_data_path }}/database.json" - mode: 0644 - owner: "{{ matrix_user_name }}" - group: "{{ matrix_group_name }}" - -- name: Ensure appservice-webhooks registration.yaml installed - ansible.builtin.copy: - content: "{{ matrix_appservice_webhooks_registration | to_nice_yaml(indent=2, width=999999) }}" - dest: "{{ matrix_appservice_webhooks_config_path }}/webhooks-registration.yaml" - mode: 0644 - owner: "{{ matrix_user_name }}" - group: "{{ matrix_group_name }}" - -- name: Ensure matrix-appservice-webhooks container network is created - community.general.docker_network: - enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}" - name: "{{ matrix_appservice_webhooks_container_network }}" - driver: bridge - driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}" - -- name: Ensure matrix-appservice-webhooks support files installed - ansible.builtin.template: - src: "{{ role_path }}/templates/{{ item }}.j2" - dest: "{{ matrix_appservice_webhooks_base_path }}/{{ item }}" - mode: 0640 - owner: "{{ matrix_user_name }}" - group: "{{ matrix_group_name }}" - with_items: - - labels - -- name: Ensure matrix-appservice-webhooks.service installed - ansible.builtin.template: - src: "{{ role_path }}/templates/systemd/matrix-appservice-webhooks.service.j2" - dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" - mode: 0644 diff --git a/roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_uninstall.yml b/roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_uninstall.yml deleted file mode 100644 index 55b7d7521..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/tasks/setup_uninstall.yml +++ /dev/null @@ -1,27 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Björn Marten -# SPDX-FileCopyrightText: 2020 MDAD project contributors -# SPDX-FileCopyrightText: 2021 - 2022 Slavi Pantaleev -# SPDX-FileCopyrightText: 2022 Marko Weltzer -# -# SPDX-License-Identifier: AGPL-3.0-or-later - ---- - -- name: Check existence of matrix-appservice-webhooks service - ansible.builtin.stat: - path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" - register: matrix_appservice_webhooks_service_stat - -- when: matrix_appservice_webhooks_service_stat.stat.exists | bool - block: - - name: Ensure matrix-appservice-webhooks is stopped - ansible.builtin.service: - name: matrix-appservice-webhooks - state: stopped - enabled: false - daemon_reload: true - - - name: Ensure matrix-appservice-webhooks.service doesn't exist - ansible.builtin.file: - path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" - state: absent diff --git a/roles/custom/matrix-bridge-appservice-webhooks/tasks/validate_config.yml b/roles/custom/matrix-bridge-appservice-webhooks/tasks/validate_config.yml deleted file mode 100644 index 5742c4c49..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/tasks/validate_config.yml +++ /dev/null @@ -1,32 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Björn Marten -# SPDX-FileCopyrightText: 2021 boris runakov -# SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev -# SPDX-FileCopyrightText: 2025 Suguru Hirahara -# -# SPDX-License-Identifier: AGPL-3.0-or-later - ---- - -- name: Fail if required matrix-appservice-webhooks settings not defined - ansible.builtin.fail: - msg: >- - You need to define a required configuration setting (`{{ item }}`). - when: "vars[item] == ''" - with_items: - - matrix_appservice_webhooks_appservice_token - - matrix_appservice_webhooks_homeserver_url - - matrix_appservice_webhooks_homeserver_token - - matrix_appservice_webhooks_id_token - - matrix_appservice_webhooks_api_secret - - matrix_appservice_webhooks_container_network - - matrix_appservice_webhooks_hostname - - matrix_appservice_webhooks_path_prefix - -- name: (Deprecation) Catch and report renamed appservice-webhooks variables - ansible.builtin.fail: - msg: >- - Your configuration contains a variable, which now has a different name. - Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml). - when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0" - with_items: - - {'old': 'matrix_appservice_webhooks_docker_image_name_prefix', 'new': 'matrix_appservice_webhooks_docker_image_registry_prefix'} diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2 b/roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2 deleted file mode 100644 index 49751624b..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2 +++ /dev/null @@ -1,28 +0,0 @@ -#jinja2: lstrip_blocks: True -# Configuration specific to the application service. All fields (unless otherwise marked) are required. -homeserver: - # The domain for the client-server API calls. - url: "{{ matrix_appservice_webhooks_homeserver_url }}" - - # The domain part for user IDs on this home server. Usually, but not always, this is the same as the - # home server's URL. - domain: "{{ matrix_domain }}" - -# Configuration specific to the bridge. All fields (unless otherwise marked) are required. -webhookBot: - # The localpart to use for the bot. May require re-registering the application service. - localpart: "_webhook" - -# Provisioning API options -provisioning: - # Your secret for the API. Required for all provisioning API requests. - secret: '{{ matrix_appservice_webhooks_api_secret }}' - -# Configuration related to the web portion of the bridge. Handles the inbound webhooks -web: - hookUrlBase: "{{ matrix_appservice_webhooks_inbound_uri_prefix }}" - -logging: - console: true - consoleLevel: {{ matrix_appservice_webhooks_log_level }} - writeFiles: false diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2.license b/roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2.license deleted file mode 100644 index b0cab88b0..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/config.yaml.j2.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2020 - 2022 Slavi Pantaleev - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2 b/roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2 deleted file mode 100644 index e70f1d832..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "defaultEnv": { - "ENV": "NODE_ENV" - }, - "development": { - "driver": "sqlite3", - "filename": "/data/development.db" - }, - "production": { - "driver": "sqlite3", - "filename": "/data/production.db" - } -} diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2.license b/roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2.license deleted file mode 100644 index 57a3f5b69..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/database.json.j2.license +++ /dev/null @@ -1,4 +0,0 @@ -SPDX-FileCopyrightText: 2020 Björn Marten -SPDX-FileCopyrightText: 2022 Slavi Pantaleev - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/labels.j2 b/roles/custom/matrix-bridge-appservice-webhooks/templates/labels.j2 deleted file mode 100644 index 8e3db68be..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/labels.j2 +++ /dev/null @@ -1,50 +0,0 @@ -{# -SPDX-FileCopyrightText: 2024 Slavi Pantaleev - -SPDX-License-Identifier: AGPL-3.0-or-later -#} - -{% if matrix_appservice_webhooks_container_labels_traefik_enabled %} -traefik.enable=true - -{% if matrix_appservice_webhooks_container_labels_traefik_docker_network %} -traefik.docker.network={{ matrix_appservice_webhooks_container_labels_traefik_docker_network }} -{% endif %} - -traefik.http.services.matrix-appservice-webhooks.loadbalancer.server.port={{ matrix_appservice_webhooks_matrix_port }} - -{% if matrix_appservice_webhooks_container_labels_public_endpoint_enabled %} -############################################################ -# # -# Public # -# # -############################################################ - -traefik.http.middlewares.matrix-appservice-webhooks-public-strip-prefix.stripprefix.prefixes={{ matrix_appservice_webhooks_container_labels_public_endpoint_prefix }} - -traefik.http.routers.matrix-appservice-webhooks-public.rule={{ matrix_appservice_webhooks_container_labels_public_endpoint_traefik_rule }} -traefik.http.routers.matrix-appservice-webhooks-public.middlewares=matrix-appservice-webhooks-public-strip-prefix - -{% if matrix_appservice_webhooks_container_labels_public_endpoint_traefik_priority | int > 0 %} -traefik.http.routers.matrix-appservice-webhooks-public.priority={{ matrix_appservice_webhooks_container_labels_public_endpoint_traefik_priority }} -{% endif %} - -traefik.http.routers.matrix-appservice-webhooks-public.service=matrix-appservice-webhooks -traefik.http.routers.matrix-appservice-webhooks-public.entrypoints={{ matrix_appservice_webhooks_container_labels_public_endpoint_traefik_entrypoints }} - -traefik.http.routers.matrix-appservice-webhooks-public.tls={{ matrix_appservice_webhooks_container_labels_public_endpoint_traefik_tls | to_json }} -{% if matrix_appservice_webhooks_container_labels_public_endpoint_traefik_tls %} -traefik.http.routers.matrix-appservice-webhooks-public.tls.certResolver={{ matrix_appservice_webhooks_container_labels_public_endpoint_traefik_tls_certResolver }} -{% endif %} - -############################################################ -# # -# /Public # -# # -############################################################ -{% endif %} - - -{% endif %} - -{{ matrix_appservice_webhooks_container_labels_additional_labels }} diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2 b/roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2 deleted file mode 100644 index e999555de..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2 +++ /dev/null @@ -1,54 +0,0 @@ -"$schema": "http://json-schema.org/draft-04/schema#" -type: "object" -properties: - provisioning: - type: "object" - properties: - secret: - type: "string" - homeserver: - type: "object" - properties: - domain: - type: "string" - url: - type: "string" - mediaUrl: - type: "string" - web: - type: "object" - properties: - hookUrlBase: - type: "string" - webhookBot: - type: "object" - properties: - localpart: - type: "string" - appearance: - type: "object" - properties: - displayName: - type: "string" - avatarUrl: - type: "string" - logging: - type: "object" - properties: - file: - type: "string" - console: - type: "boolean" - consoleLevel: - type: "string" - fileLevel: - type: "string" - writeFiles: - type: "boolean" - rotate: - type: "object" - properties: - size: - type: "number" - count: - type: "number" diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2.license b/roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2.license deleted file mode 100644 index 57a3f5b69..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/schema.yml.j2.license +++ /dev/null @@ -1,4 +0,0 @@ -SPDX-FileCopyrightText: 2020 Björn Marten -SPDX-FileCopyrightText: 2022 Slavi Pantaleev - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 b/roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 deleted file mode 100644 index 9e7df5c4c..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 +++ /dev/null @@ -1,51 +0,0 @@ -#jinja2: lstrip_blocks: True -[Unit] -Description=Matrix Appservice webhooks bridge -{% for service in matrix_appservice_webhooks_systemd_required_services_list %} -Requires={{ service }} -After={{ service }} -{% endfor %} -{% for service in matrix_appservice_webhooks_systemd_wanted_services_list %} -Wants={{ service }} -{% endfor %} -DefaultDependencies=no - -[Service] -Type=simple -Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" -ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-appservice-webhooks 2>/dev/null || true' -ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null || true' - -ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ - --rm \ - --name=matrix-appservice-webhooks \ - --log-driver=none \ - --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ - --cap-drop=ALL \ - --network={{ matrix_appservice_webhooks_container_network }} \ - {% if matrix_appservice_webhooks_container_http_host_bind_port %} - -p {{ matrix_appservice_webhooks_container_http_host_bind_port }}:{{matrix_appservice_webhooks_matrix_port}} \ - {% endif %} - --mount type=bind,src={{ matrix_appservice_webhooks_config_path }},dst=/config \ - --mount type=bind,src={{ matrix_appservice_webhooks_data_path }},dst=/data \ - --label-file={{ matrix_appservice_webhooks_base_path }}/labels \ - {% for arg in matrix_appservice_webhooks_container_extra_arguments %} - {{ arg }} \ - {% endfor %} - {{ matrix_appservice_webhooks_docker_image }} \ - node index.js -p {{ matrix_appservice_webhooks_matrix_port }} -c /config/config.yaml -f /config/webhooks-registration.yaml - -{% for network in matrix_appservice_webhooks_container_additional_networks %} -ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-appservice-webhooks -{% endfor %} - -ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-appservice-webhooks - -ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-appservice-webhooks 2>/dev/null || true' -ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null || true' -Restart=always -RestartSec=30 -SyslogIdentifier=matrix-appservice-webhooks - -[Install] -WantedBy=multi-user.target diff --git a/roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2.license b/roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2.license deleted file mode 100644 index fe9fa1747..000000000 --- a/roles/custom/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2.license +++ /dev/null @@ -1,8 +0,0 @@ -SPDX-FileCopyrightText: 2020 - 2025 Slavi Pantaleev -SPDX-FileCopyrightText: 2020 Björn Marten -SPDX-FileCopyrightText: 2020 Chris van Dijk -SPDX-FileCopyrightText: 2020 MDAD project contributors -SPDX-FileCopyrightText: 2020 Scott Crossen -SPDX-FileCopyrightText: 2020 Stefan Warnat - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml index 29ca8bafb..bee7e89e4 100644 --- a/roles/custom/matrix_playbook_migration/tasks/validate_config.yml +++ b/roles/custom/matrix_playbook_migration/tasks/validate_config.yml @@ -534,6 +534,18 @@ The following variables in your configuration need to be renamed: {{ lookup('ansible.builtin.varnames', '^devture_container_socket_proxy_.+', wantlist=True) | join(', ') }} when: "lookup('ansible.builtin.varnames', '^devture_container_socket_proxy_.+', wantlist=True) | length > 0" +- name: (Deprecation) Catch and report matrix-appservice-webhooks variables + ansible.builtin.fail: + msg: |- + matrix-appservice-webhooks was completely removed from the playbook in November 2025. + + Please remove all `matrix_appservice_webhooks_*` variables from your configuration file (vars.yml). + + You may also wish to uninstall the bridge manually. See `docs/configuring-playbook-bridge-appservice-webhooks.md` for more information. + + The following variables in your configuration need to be removed: {{ lookup('ansible.builtin.varnames', '^matrix_appservice_webhooks_.+', wantlist=True) | join(', ') }} + when: "lookup('ansible.builtin.varnames', '^matrix_appservice_webhooks_.+', wantlist=True) | length > 0" + - name: (Deprecation) Catch and report matrix-chatgpt-bot variables ansible.builtin.fail: msg: |- diff --git a/setup.yml b/setup.yml index e4547d212..e89b40ef3 100644 --- a/setup.yml +++ b/setup.yml @@ -56,7 +56,6 @@ - custom/matrix-alertmanager-receiver - custom/matrix-bridge-appservice-discord - custom/matrix-bridge-appservice-slack - - custom/matrix-bridge-appservice-webhooks - custom/matrix-bridge-appservice-irc - custom/matrix-bridge-appservice-kakaotalk - custom/matrix-bridge-beeper-linkedin