mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-11-13 05:28:56 +01:00
Remove matrix-bridge-appservice-webhooks
Reuse: -1861faf31d/docs/configuring-playbook-bridge-mx-puppet-twitter.md-2b7a0453ebSigned-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
This commit is contained in:
committed by
Slavi Pantaleev
parent
fb1824e66d
commit
386d94a8f6
@@ -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 "<ip>:<port>" or "<port>" 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 }}"
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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'}
|
||||
@@ -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
|
||||
@@ -1,3 +0,0 @@
|
||||
SPDX-FileCopyrightText: 2020 - 2022 Slavi Pantaleev
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"defaultEnv": {
|
||||
"ENV": "NODE_ENV"
|
||||
},
|
||||
"development": {
|
||||
"driver": "sqlite3",
|
||||
"filename": "/data/development.db"
|
||||
},
|
||||
"production": {
|
||||
"driver": "sqlite3",
|
||||
"filename": "/data/production.db"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
SPDX-FileCopyrightText: 2020 Björn Marten
|
||||
SPDX-FileCopyrightText: 2022 Slavi Pantaleev
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
@@ -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 }}
|
||||
@@ -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"
|
||||
@@ -1,4 +0,0 @@
|
||||
SPDX-FileCopyrightText: 2020 Björn Marten
|
||||
SPDX-FileCopyrightText: 2022 Slavi Pantaleev
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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: |-
|
||||
|
||||
Reference in New Issue
Block a user