mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-01-31 00:43:24 +03:00
Merge branch 'master' into feature-fluffygate
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
matrix_alertmanager_receiver_enabled: true
|
||||
|
||||
# renovate: datasource=docker depName=docker.io/metio/matrix-alertmanager-receiver
|
||||
matrix_alertmanager_receiver_version: 2024.10.23
|
||||
matrix_alertmanager_receiver_version: 2024.12.18
|
||||
|
||||
matrix_alertmanager_receiver_scheme: https
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
matrix_appservice_draupnir_for_all_enabled: true
|
||||
|
||||
# renovate: datasource=docker depName=gnuxie/draupnir
|
||||
matrix_appservice_draupnir_for_all_version: "1.87.0"
|
||||
matrix_appservice_draupnir_for_all_version: "v2.0.1"
|
||||
|
||||
matrix_appservice_draupnir_for_all_container_image_self_build: false
|
||||
matrix_appservice_draupnir_for_all_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
|
||||
@@ -40,7 +40,7 @@ matrix_appservice_draupnir_for_all_systemd_wanted_services_list: []
|
||||
# The room ID where people can use the bot. The bot has no access controls, so
|
||||
# anyone in this room can use the bot - secure your room!
|
||||
# This should be a room alias - not a matrix.to URL.
|
||||
# Note: draupnir is fairly verbose - expect a lot of messages from it.
|
||||
# Note: Draupnir is fairly verbose - expect a lot of messages from it.
|
||||
# This room is diffrent for Appservice Mode compared to normal mode.
|
||||
# In Appservice mode it provides functions like user management.
|
||||
matrix_appservice_draupnir_for_all_master_control_room_alias: ""
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
- {path: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}", when: "{{ matrix_appservice_draupnir_for_all_container_image_self_build }}"}
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure draupnir Docker image is pulled
|
||||
- name: Ensure Draupnir Docker image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_appservice_draupnir_for_all_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
@@ -29,7 +29,7 @@
|
||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure draupnir repository is present on self-build
|
||||
- name: Ensure Draupnir repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_appservice_draupnir_for_all_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}"
|
||||
@@ -40,7 +40,7 @@
|
||||
register: matrix_appservice_draupnir_for_all_git_pull_results
|
||||
when: "matrix_appservice_draupnir_for_all_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure draupnir Docker image is built
|
||||
- name: Ensure Draupnir Docker image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_appservice_draupnir_for_all_docker_image }}"
|
||||
source: build
|
||||
|
||||
@@ -4,20 +4,10 @@
|
||||
# This should be at INFO or DEBUG in order to get support for Draupnir problems.
|
||||
logLevel: "INFO"
|
||||
|
||||
# Whether or not Draupnir should synchronize policy lists immediately after startup.
|
||||
# Equivalent to running '!draupnir sync'.
|
||||
syncOnStartup: true
|
||||
|
||||
# Whether or not Draupnir should check moderation permissions in all protected rooms on startup.
|
||||
# Equivalent to running `!draupnir verify`.
|
||||
verifyPermissionsOnStartup: true
|
||||
|
||||
# Whether Draupnir should check member lists quicker (by using a different endpoint),
|
||||
# keep in mind that enabling this will miss invited (but not joined) users.
|
||||
#
|
||||
# Turn on if your bot is in (very) large rooms, or in large amounts of rooms.
|
||||
fasterMembershipChecks: false
|
||||
|
||||
# A case-insensitive list of ban reasons to have the bot also automatically redact the user's messages for.
|
||||
#
|
||||
# If the bot sees you ban a user with a reason that is an (exact case-insensitive) match to this list,
|
||||
@@ -70,14 +60,10 @@ commands:
|
||||
- "draupnir_bot"
|
||||
- "draupnir"
|
||||
|
||||
# Whether or not commands with a wildcard (*) will require an additional `--force` argument
|
||||
# in the command to be able to be submitted.
|
||||
confirmWildcardBan: true
|
||||
|
||||
# The default reasons to be prompted with if the reason is missing from a ban command.
|
||||
ban:
|
||||
defaultReasons:
|
||||
defaultReasons:
|
||||
- "spam"
|
||||
- "brigading"
|
||||
- "harassment"
|
||||
- "disagreement"
|
||||
- "disagreement"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
# The bare domain name which represents your Matrix identity.
|
||||
# Matrix user ids for your server will be of the form (`@user:example.com`).
|
||||
# Matrix user IDs for your server will be of the form (`@alice:example.com`).
|
||||
#
|
||||
# Note: this playbook does not touch the server referenced here.
|
||||
# Installation happens on another server ("matrix.example.com", see `matrix_server_fqn_matrix`).
|
||||
@@ -10,7 +10,7 @@
|
||||
matrix_domain: ~
|
||||
|
||||
# The optional Matrix admin MXID, used in bridges' configs to set bridge admin user
|
||||
# Example value: "@someone:{{ matrix_domain }}"
|
||||
# Example value: "@alice:{{ matrix_domain }}"
|
||||
matrix_admin: ''
|
||||
|
||||
# Global var to enable/disable encryption across all bridges with encryption support
|
||||
@@ -49,12 +49,12 @@ matrix_monitoring_container_network: matrix-monitoring
|
||||
matrix_homeserver_enabled: true
|
||||
|
||||
# This will contain the homeserver implementation that is in use.
|
||||
# Valid values: synapse, dendrite, conduit
|
||||
# Valid values: synapse, dendrite, conduit, conduwuit
|
||||
#
|
||||
# By default, we use Synapse, because it's the only full-featured Matrix server at the moment.
|
||||
#
|
||||
# This value automatically influences other variables (`matrix_synapse_enabled`, `matrix_dendrite_enabled`, etc.).
|
||||
# The homeserver implementation of an existing server cannot be changed without data loss.
|
||||
# Note that the homeserver implementation of a server will not be able to be changed without data loss.
|
||||
matrix_homeserver_implementation: synapse
|
||||
|
||||
# This contains a secret, which is used for generating various other secrets later on.
|
||||
@@ -67,7 +67,7 @@ matrix_server_fqn_matrix: "matrix.{{ matrix_domain }}"
|
||||
# This is where you access federation API.
|
||||
matrix_server_fqn_matrix_federation: '{{ matrix_server_fqn_matrix }}'
|
||||
|
||||
# This is where you access the Element web UI from (if enabled via matrix_client_element_enabled; enabled by default).
|
||||
# This is where you access the Element Web from (if enabled via matrix_client_element_enabled; enabled by default).
|
||||
# This and the Matrix FQN (see above) are expected to be on the same server.
|
||||
matrix_server_fqn_element: "element.{{ matrix_domain }}"
|
||||
|
||||
@@ -77,10 +77,10 @@ matrix_server_fqn_hydrogen: "hydrogen.{{ matrix_domain }}"
|
||||
# This is where you access the Cinny web client from (if enabled via matrix_client_cinny_enabled; disabled by default).
|
||||
matrix_server_fqn_cinny: "cinny.{{ matrix_domain }}"
|
||||
|
||||
# This is where you access the SchildiChat web client from (if enabled via matrix_client_schildichat_enabled; disabled by default).
|
||||
# This is where you access the SchildiChat Web from (if enabled via matrix_client_schildichat_enabled; disabled by default).
|
||||
matrix_server_fqn_schildichat: "schildichat.{{ matrix_domain }}"
|
||||
|
||||
# This is where you access the buscarron bot from (if enabled via matrix_bot_buscarron_enabled; disabled by default).
|
||||
# This is where you access the Buscarron bot from (if enabled via matrix_bot_buscarron_enabled; disabled by default).
|
||||
matrix_server_fqn_buscarron: "buscarron.{{ matrix_domain }}"
|
||||
|
||||
# This is where you access the Dimension.
|
||||
@@ -234,11 +234,18 @@ matrix_metrics_exposure_http_basic_auth_users: ''
|
||||
matrix_playbook_reverse_proxy_type: ''
|
||||
|
||||
# Specifies the network that the reverse-proxy is operating at
|
||||
matrix_playbook_reverse_proxy_container_network: 'traefik'
|
||||
matrix_playbook_reverse_proxy_container_network: "{{ 'traefik' if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] else '' }}"
|
||||
|
||||
# Specifies the hostname that the reverse-proxy is available at
|
||||
matrix_playbook_reverse_proxy_hostname: 'matrix-traefik'
|
||||
|
||||
# Specifies whether the Traefik reverse-proxy (if `matrix_playbook_reverse_proxy_type` indicates that Traefik is being used) defines a compression middleware.
|
||||
matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled: false
|
||||
|
||||
# Specifies the name of the compression middleware defined for the Traefik reverse-proxy (if `matrix_playbook_reverse_proxy_type` indicates that Traefik is being used).
|
||||
# It's better to use a fully-qualified middleware name (e.g. `compression@docker` or `compression@file`) here to prevent ambiguity.
|
||||
matrix_playbook_reverse_proxy_traefik_middleware_compression_name: ''
|
||||
|
||||
# Controls the additional network that reverse-proxyable services will be connected to.
|
||||
matrix_playbook_reverse_proxyable_services_additional_network: "{{ matrix_playbook_reverse_proxy_container_network }}"
|
||||
|
||||
@@ -267,11 +274,38 @@ matrix_playbook_public_matrix_federation_api_traefik_entrypoint_host_bind_port_u
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config: "{{ (matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_default | combine (matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_auto)) | combine(matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_custom, recursive=True) }}"
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_enabled: true
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_advertisedPort: "{{ matrix_playbook_public_matrix_federation_api_traefik_entrypoint_port }}" # noqa var-naming
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_transport_respondingTimeouts_readTimeout: "{{ traefik_config_entrypoint_web_secure_transport_respondingTimeouts_readTimeout }}" # noqa var-naming
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_transport_respondingTimeouts_writeTimeout: "{{ traefik_config_entrypoint_web_secure_transport_respondingTimeouts_writeTimeout }}" # noqa var-naming
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_transport_respondingTimeouts_idleTimeout: "{{ traefik_config_entrypoint_web_secure_transport_respondingTimeouts_idleTimeout }}" # noqa var-naming
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_default: |
|
||||
{{
|
||||
({'http3': {'advertisedPort': matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_advertisedPort | int}})
|
||||
if matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_enabled
|
||||
else {}
|
||||
{}
|
||||
|
||||
| combine(
|
||||
(
|
||||
(
|
||||
{
|
||||
'http3': {
|
||||
'advertisedPort': matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_advertisedPort | int
|
||||
}
|
||||
}
|
||||
)
|
||||
if matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_enabled
|
||||
else {}
|
||||
)
|
||||
)
|
||||
|
||||
| combine(
|
||||
{
|
||||
'transport': {
|
||||
'respondingTimeouts': {
|
||||
'readTimeout': matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_transport_respondingTimeouts_readTimeout,
|
||||
'writeTimeout': matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_transport_respondingTimeouts_writeTimeout,
|
||||
'idleTimeout': matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_transport_respondingTimeouts_idleTimeout,
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}}
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_auto: {}
|
||||
matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_custom: {}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
- name: Fail if invalid homeserver implementation
|
||||
ansible.builtin.fail:
|
||||
msg: "You need to set a valid homeserver implementation in `matrix_homeserver_implementation`"
|
||||
when: "matrix_homeserver_implementation not in ['synapse', 'dendrite', 'conduit']"
|
||||
when: "matrix_homeserver_implementation not in ['synapse', 'dendrite', 'conduit', 'conduwuit']"
|
||||
|
||||
- name: (Deprecation) Catch and report renamed settings
|
||||
ansible.builtin.fail:
|
||||
|
||||
@@ -6,7 +6,7 @@ if [ "$(id -u)" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "WARNING! You are about to remove everything the playbook installs for {{ matrix_server_fqn_matrix }}: matrix, docker images,..."
|
||||
echo "WARNING! You are about to remove everything the playbook installs for {{ matrix_server_fqn_matrix }}: matrix, docker images, …"
|
||||
echo -n "If you're sure you want to do this, type: 'Yes, I really want to remove everything!'"
|
||||
read sure
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ matrix_bot_baibot_container_repo_version: "{{ 'main' if matrix_bot_baibot_versio
|
||||
matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/etkecc/baibot
|
||||
matrix_bot_baibot_version: v1.3.1
|
||||
matrix_bot_baibot_version: v1.4.1
|
||||
matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_name_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
|
||||
matrix_bot_baibot_container_image_name_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else 'ghcr.io/' }}"
|
||||
matrix_bot_baibot_container_image_force_pull: "{{ matrix_bot_baibot_container_image.endswith(':latest') }}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
|
||||
# buscarron is a Web forms (HTTP POST) to Matrix service.
|
||||
# Buscarron is a Web forms (HTTP POST) to Matrix service.
|
||||
# Project source code URL: https://github.com/etkecc/buscarron
|
||||
|
||||
matrix_bot_buscarron_enabled: true
|
||||
@@ -186,7 +186,7 @@ matrix_bot_buscarron_smtp_from: ''
|
||||
# enforce SMTP validation
|
||||
matrix_bot_buscarron_smtp_validation: false
|
||||
|
||||
# Additional environment variables to pass to the buscarron container
|
||||
# Additional environment variables to pass to the Buscarron container
|
||||
#
|
||||
# Example:
|
||||
# matrix_bot_buscarron_environment_variables_extension: |
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_bot_buscarron_requires_restart: true
|
||||
|
||||
- name: Ensure buscarron paths exist
|
||||
- name: Ensure Buscarron paths exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
@@ -40,7 +40,7 @@
|
||||
- {path: "{{ matrix_bot_buscarron_docker_src_files_path }}", when: true}
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure buscarron support files installed
|
||||
- name: Ensure Buscarron support files installed
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||
dest: "{{ matrix_bot_buscarron_config_path }}/{{ item }}"
|
||||
@@ -51,7 +51,7 @@
|
||||
- env
|
||||
- labels
|
||||
|
||||
- name: Ensure buscarron image is pulled
|
||||
- name: Ensure Buscarron image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_buscarron_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
@@ -63,7 +63,7 @@
|
||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure buscarron repository is present on self-build
|
||||
- name: Ensure Buscarron repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_buscarron_docker_repo }}"
|
||||
version: "{{ matrix_bot_buscarron_docker_repo_version }}"
|
||||
@@ -74,7 +74,7 @@
|
||||
register: matrix_bot_buscarron_git_pull_results
|
||||
when: "matrix_bot_buscarron_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure buscarron image is built
|
||||
- name: Ensure Buscarron image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_buscarron_docker_image }}"
|
||||
source: build
|
||||
@@ -92,7 +92,7 @@
|
||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
|
||||
mode: 0644
|
||||
|
||||
- name: Ensure buscarron container network is created
|
||||
- name: Ensure Buscarron container network is created
|
||||
community.general.docker_network:
|
||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||
name: "{{ matrix_bot_buscarron_container_network }}"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
|
||||
state: absent
|
||||
|
||||
- name: Ensure Matrix buscarron paths don't exist
|
||||
- name: Ensure Matrix Buscarron paths don't exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_bot_buscarron_base_path }}"
|
||||
state: absent
|
||||
|
||||
@@ -57,7 +57,7 @@ matrix_bot_chatgpt_keyv_bot_storage: true
|
||||
# Matrix Static Settings (required, see notes)
|
||||
# Defaults to "https://matrix.org"
|
||||
matrix_bot_chatgpt_matrix_homeserver_url: "" # MATRIX_HOMESERVER_URL=
|
||||
# With the @ and :example.com, ie @SOMETHING:example.com, needs to be set, created manually beforehand.
|
||||
# With the @ and :example.com, ie @bot.chatgpt:example.com, needs to be set, created manually beforehand.
|
||||
matrix_bot_chatgpt_matrix_bot_username_localpart: 'bot.chatgpt'
|
||||
matrix_bot_chatgpt_matrix_bot_username: "@{{ matrix_bot_chatgpt_matrix_bot_username_localpart }}:{{ matrix_domain }}" # MATRIX_BOT_USERNAME=
|
||||
# Set `MATRIX_BOT_PASSWORD` the bot will print an `MATRIX_ACCESS_TOKEN` to the terminal
|
||||
@@ -87,8 +87,8 @@ matrix_bot_chatgpt_matrix_rich_text: true # MATRIX_RICH_TEXT=true
|
||||
# A list of admins
|
||||
# Example set of rules:
|
||||
# matrix_bot_chatgpt_admins:
|
||||
# - @someone:example.com
|
||||
# - @another:example.com
|
||||
# - @alice:example.com
|
||||
# - @bob:example.com
|
||||
# - @bot.*:example.com
|
||||
# - @*:example.net
|
||||
# matrix_bot_chatgpt_admins: "{{ [matrix_admin] if matrix_admin else [] }}"
|
||||
|
||||
@@ -10,7 +10,7 @@ KEYV_URL={{ matrix_bot_chatgpt_keyv_url }}
|
||||
KEYV_BOT_ENCRYPTION={{ matrix_bot_chatgpt_keyv_bot_encryption|lower }}
|
||||
KEYV_BOT_STORAGE={{ matrix_bot_chatgpt_keyv_bot_storage|lower }}
|
||||
|
||||
# With the @ and :example.com, ie @SOMETHING:example.com
|
||||
# With the @ and :example.com, ie @bot.chatgpt:example.com
|
||||
MATRIX_BOT_USERNAME={{ matrix_bot_chatgpt_matrix_bot_username }}
|
||||
MATRIX_BOT_PASSWORD={{ matrix_bot_chatgpt_matrix_bot_password }}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
matrix_bot_draupnir_enabled: true
|
||||
|
||||
# renovate: datasource=docker depName=gnuxie/draupnir
|
||||
matrix_bot_draupnir_version: "v1.87.0"
|
||||
matrix_bot_draupnir_version: "v2.0.1"
|
||||
|
||||
matrix_bot_draupnir_container_image_self_build: false
|
||||
matrix_bot_draupnir_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
|
||||
@@ -49,8 +49,20 @@ matrix_bot_draupnir_systemd_wanted_services_list: []
|
||||
# Whether Draupnir should talk to the homeserver through Pantalaimon
|
||||
# If true, then other variables must be provided including pointing
|
||||
# `matrix_bot_draupnir_homeserver_url` to the Pantalaimon URL.
|
||||
# Enabling this option is discouraged, because Draupnir does not support
|
||||
# running with Pantalaimon as it would break all workflows that involve answering
|
||||
# prompts with reactions. (Hint: a lot of workflows rely on them.)
|
||||
matrix_bot_draupnir_pantalaimon_use: false
|
||||
|
||||
# If you choose to accept the risks of using Pantalaimon in your installation
|
||||
# against the upstream advice, you can enable this to disable the warning about it.
|
||||
matrix_bot_draupnir_pantalaimon_breakage_ignore: false
|
||||
|
||||
# Tells the bot if it should use its native E2EE support in the form of experimental Rust Crypto in the bot SDK.
|
||||
# This option is mutually exclusive with `matrix_bot_draupnir_pantalaimon_use`.
|
||||
# Rust Crypto requires a clean access token that has not touched E2EE so curl is recommended as a method to obtain it.
|
||||
matrix_bot_draupnir_enable_experimental_rust_crypto: false
|
||||
|
||||
# The access token for the bot user. Required when NOT using Pantalaimon.
|
||||
# (Otherwise provide `matrix_bot_draupnir_pantalaimon_username` and `matrix_bot_draupnir_pantalaimon_password` instead.)
|
||||
matrix_bot_draupnir_access_token: ""
|
||||
@@ -60,6 +72,15 @@ matrix_bot_draupnir_access_token: ""
|
||||
matrix_bot_draupnir_pantalaimon_username: ""
|
||||
matrix_bot_draupnir_pantalaimon_password: ""
|
||||
|
||||
# Username and password the bot uses for logging in directly. If using Pantalimon
|
||||
# these values become the values of `matrix_bot_draupnir_pantalaimon_username` and `matrix_bot_draupnir_pantalaimon_password`
|
||||
matrix_bot_draupnir_login: "{{ matrix_bot_draupnir_pantalaimon_username if matrix_bot_draupnir_pantalaimon_use == 'true' else 'bot.draupnir' }}"
|
||||
matrix_bot_draupnir_password: "{{ matrix_bot_draupnir_pantalaimon_password }}"
|
||||
|
||||
# Controls if we activate the pantalaimon config block for now. This configuration block is proable to change name for our usecase
|
||||
# due to a Draupnir push to scrub Pantalaimon from the codebase.
|
||||
matrix_bot_draupnir_login_native: ""
|
||||
|
||||
# The room ID where people can use the bot. The bot has no access controls, so
|
||||
# anyone in this room can use the bot - secure your room!
|
||||
# This should be a room alias or room ID - not a matrix.to URL.
|
||||
@@ -84,6 +105,11 @@ matrix_bot_draupnir_raw_homeserver_url: ""
|
||||
# Its Exposed here because its common enough to be valid to expose.
|
||||
matrix_bot_draupnir_disable_server_acl: "false"
|
||||
|
||||
# Controls if the room state backing store is activated.
|
||||
# Room state backing store makes restarts of the bot lightning fast as the bot does not suffer from amnesia.
|
||||
# This config option has diminished improvements for bots on extremely fast homeservers or very very small bots on fast homeservers.
|
||||
matrix_bot_draupnir_enable_room_state_backing_store: "true"
|
||||
|
||||
# Default configuration template which covers the generic use case.
|
||||
# You can customize it by controlling the various variables inside it.
|
||||
#
|
||||
@@ -106,7 +132,7 @@ matrix_bot_draupnir_configuration_extension: "{{ matrix_bot_draupnir_configurati
|
||||
# You most likely don't need to touch this variable. Instead, see `matrix_bot_draupnir_configuration_yaml`.
|
||||
matrix_bot_draupnir_configuration: "{{ matrix_bot_draupnir_configuration_yaml | from_yaml | combine(matrix_bot_draupnir_configuration_extension, recursive=True) }}"
|
||||
|
||||
# Controls whether labels will be added that redirect the /_matrix/client/../rooms/../report paths to draupnir
|
||||
# Controls whether labels will be added that redirect the /_matrix/client/../rooms/../report paths to Draupnir
|
||||
# Following these recommendations (https://github.com/element-hq/synapse/blob/master/docs/reverse_proxy.md), by default, we don't.
|
||||
# Regardless of whether this is enabled, it may or may not take effect due to the value of other variables.
|
||||
# See `matrix_synapse_container_labels_traefik_enabled` or `matrix_synapse_container_labels_matrix_related_labels_enabled`
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
- src: "{{ role_path }}/templates/labels.j2"
|
||||
dest: "{{ matrix_bot_draupnir_base_path }}/labels"
|
||||
|
||||
- name: Ensure draupnir Docker image is pulled
|
||||
- name: Ensure Draupnir Docker image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_draupnir_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
@@ -40,7 +40,7 @@
|
||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure draupnir repository is present on self-build
|
||||
- name: Ensure Draupnir repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_draupnir_container_image_self_build_repo }}"
|
||||
dest: "{{ matrix_bot_draupnir_docker_src_files_path }}"
|
||||
@@ -51,7 +51,7 @@
|
||||
register: matrix_bot_draupnir_git_pull_results
|
||||
when: "matrix_bot_draupnir_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure draupnir Docker image is built
|
||||
- name: Ensure Draupnir Docker image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_draupnir_docker_image }}"
|
||||
source: build
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
msg: "The `{{ item.name }}` variable must be defined and have a non-null value."
|
||||
with_items:
|
||||
- {'name': 'matrix_bot_draupnir_access_token', when: "{{ not matrix_bot_draupnir_pantalaimon_use }}"}
|
||||
- {'name': 'matrix_bot_draupnir_access_token', when: "{{ matrix_bot_draupnir_enable_experimental_rust_crypto }}"}
|
||||
- {'name': 'matrix_bot_draupnir_management_room', when: true}
|
||||
- {'name': 'matrix_bot_draupnir_container_network', when: true}
|
||||
- {'name': 'matrix_bot_draupnir_homeserver_url', when: true}
|
||||
@@ -18,4 +19,19 @@
|
||||
msg: "The `{{ item.name }}` variable must be undefined or have a null value."
|
||||
with_items:
|
||||
- {'name': 'matrix_bot_draupnir_access_token', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
|
||||
- {'name': 'matrix_bot_draupnir_access_token', when: "{{ matrix_bot_draupnir_login_native }}"}
|
||||
- {'name': 'matrix_bot_draupnir_pantalaimon_use', when: "{{ matrix_bot_draupnir_enable_experimental_rust_crypto }}"}
|
||||
when: "item.when | bool and not (vars[item.name] == '' or vars[item.name] is none)"
|
||||
|
||||
- when: "matrix_bot_draupnir_pantalaimon_use == 'true' and matrix_bot_draupnir_pantalaimon_breakage_ignore == 'false'"
|
||||
block:
|
||||
- name: Inject warning if Pantalaimon is used together with Draupnir
|
||||
ansible.builtin.set_fact:
|
||||
devture_playbook_runtime_messages_list: |
|
||||
{{
|
||||
devture_playbook_runtime_messages_list | default([])
|
||||
+
|
||||
[
|
||||
"Note: Draupnir does not support running with Pantalaimon as it would break all workflows that involve answering prompts with reactions. To enable E2EE for Draupnir, it is recommended to use matrix_bot_draupnir_enable_experimental_rust_crypto instead. This warning can be disabled by setting matrix_bot_draupnir_pantalaimon_breakage_ignore to true."
|
||||
]
|
||||
}}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Endpoint URL that Draupnir uses to interact with the Matrix homeserver (client-server API),
|
||||
# set this to the pantalaimon URL if you're using that.
|
||||
homeserverUrl: {{ matrix_bot_draupnir_homeserver_url | to_json }}
|
||||
|
||||
# Endpoint URL that Draupnir could use to fetch events related to reports (client-server API and /_synapse/),
|
||||
@@ -7,29 +6,36 @@ homeserverUrl: {{ matrix_bot_draupnir_homeserver_url | to_json }}
|
||||
rawHomeserverUrl: {{ matrix_bot_draupnir_raw_homeserver_url | to_json }}
|
||||
|
||||
# Matrix Access Token to use, Draupnir will only use this if pantalaimon.use is false.
|
||||
# This option can be loaded from a file by passing "--access-token-path <path>" at the command line,
|
||||
# which would allow using secret management systems such as systemd's service credentials.
|
||||
accessToken: {{ matrix_bot_draupnir_access_token | to_json }}
|
||||
|
||||
{% if matrix_bot_draupnir_pantalaimon_use %}
|
||||
{% if matrix_bot_draupnir_pantalaimon_use or matrix_bot_draupnir_login_native %}
|
||||
# Options related to Pantalaimon (https://github.com/matrix-org/pantalaimon)
|
||||
pantalaimon:
|
||||
# Whether or not Draupnir will use pantalaimon to access the Matrix homeserver,
|
||||
# set to `true` if you're using pantalaimon.
|
||||
#
|
||||
# Be sure to point homeserverUrl to the pantalaimon instance.
|
||||
# Set to `true` when the bot is to login and fetch the access token on its own.
|
||||
#
|
||||
# Draupnir will log in using the given username and password once,
|
||||
# then store the resulting access token in a file under dataPath.
|
||||
use: true
|
||||
|
||||
# The username to login with.
|
||||
username: {{ matrix_bot_draupnir_pantalaimon_username | to_json }}
|
||||
username: {{ matrix_bot_draupnir_login | to_json }}
|
||||
|
||||
# The password Draupnir will login with.
|
||||
#
|
||||
# After successfully logging in once, this will be ignored, so this value can be blanked after first startup.
|
||||
password: {{ matrix_bot_draupnir_pantalaimon_password | to_json }}
|
||||
# This option can be loaded from a file by passing "--password-path <path>" at the command line,
|
||||
# which would allow using secret management systems such as systemd's service credentials.
|
||||
password: {{ matrix_bot_draupnir_password | to_json }}
|
||||
{% endif %}
|
||||
|
||||
# Experimental usage of the matrix-bot-sdk rust crypto. This can not be used with Pantalaimon.
|
||||
# Make sure Pantalaimon is disabled in Draupnir's configuration.
|
||||
#
|
||||
# Warning: At this time this is not considered production safe.
|
||||
experimentalRustCrypto: {{ matrix_bot_draupnir_enable_experimental_rust_crypto | to_json }}
|
||||
|
||||
# The path Draupnir will store its state/data in, leave default ("/data/storage") when using containers.
|
||||
dataPath: "/data"
|
||||
|
||||
@@ -56,8 +62,8 @@ managementRoom: {{ matrix_bot_draupnir_management_room | to_json }}
|
||||
# Deprecated and will be removed in a future version.
|
||||
# Running with verboseLogging is unsupported.
|
||||
# Whether Draupnir should log a lot more messages in the room,
|
||||
# mainly involves "all-OK" messages, and debugging messages for when draupnir checks bans in a room.
|
||||
#verboseLogging: false
|
||||
# mainly involves "all-OK" messages, and debugging messages for when Draupnir checks bans in a room.
|
||||
verboseLogging: false
|
||||
|
||||
# The log level of terminal (or container) output,
|
||||
# can be one of DEBUG, INFO, WARN and ERROR, in increasing order of importance and severity.
|
||||
@@ -81,12 +87,6 @@ noop: false
|
||||
# DO NOT change this to `true` unless you are very confident that you know what you are doing.
|
||||
disableServerACL: {{ matrix_bot_draupnir_disable_server_acl | to_json }}
|
||||
|
||||
# Whether Draupnir should check member lists quicker (by using a different endpoint),
|
||||
# keep in mind that enabling this will miss invited (but not joined) users.
|
||||
#
|
||||
# Turn on if your bot is in (very) large rooms, or in large amounts of rooms.
|
||||
fasterMembershipChecks: false
|
||||
|
||||
# A case-insensitive list of ban reasons to have the bot also automatically redact the user's messages for.
|
||||
#
|
||||
# If the bot sees you ban a user with a reason that is an (exact case-insensitive) match to this list,
|
||||
@@ -102,15 +102,6 @@ automaticallyRedactForReasons:
|
||||
- "spam"
|
||||
- "advertising"
|
||||
|
||||
# A list of rooms to protect. Draupnir will add this to the list it knows from its account data.
|
||||
#
|
||||
# It won't, however, add it to the account data.
|
||||
# Manually add the room via '!draupnir rooms add' to have it stay protected regardless if this config value changes.
|
||||
#
|
||||
# Note: These must be matrix.to URLs
|
||||
#protectedRooms:
|
||||
# - "https://matrix.to/#/#matrix:example.org"
|
||||
|
||||
# Whether or not to add all joined rooms to the "protected rooms" list
|
||||
# (excluding the management room and watched policy list rooms, see below).
|
||||
#
|
||||
@@ -131,15 +122,18 @@ protectAllJoinedRooms: false
|
||||
# of the homeserver may be more impacted.
|
||||
backgroundDelayMS: 500
|
||||
|
||||
# FIXME: This configuration option is currently broken in the playbook as admin APIs cannot
|
||||
# be accessed from containers. See https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3389
|
||||
# and https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3308
|
||||
# Server administration commands, these commands will only work if Draupnir is
|
||||
# a global server administrator, and the bot's server is a Synapse instance.
|
||||
admin:
|
||||
# Whether or not Draupnir can temporarily take control of any eligible account from the local homeserver who's in the room
|
||||
# (with enough permissions) to "make" a user an admin.
|
||||
#
|
||||
# This only works if a local user with enough admin permissions is present in the room.
|
||||
enableMakeRoomAdminCommand: false
|
||||
|
||||
#admin:
|
||||
# # Whether or not Draupnir can temporarily take control of any eligible account from the local homeserver who's in the room
|
||||
# # (with enough permissions) to "make" a user an admin.
|
||||
# #
|
||||
# # This only works if a local user with enough admin permissions is present in the room.
|
||||
# enableMakeRoomAdminCommand: false
|
||||
#
|
||||
# Misc options for command handling and commands
|
||||
commands:
|
||||
# Whether or not the `!draupnir` prefix is necessary to submit commands.
|
||||
@@ -157,10 +151,6 @@ commands:
|
||||
- "draupnir_bot"
|
||||
- "draupnir"
|
||||
|
||||
# Whether or not commands with a wildcard (*) will require an additional `--force` argument
|
||||
# in the command to be able to be submitted.
|
||||
confirmWildcardBan: true
|
||||
|
||||
# The default reasons to be prompted with if the reason is missing from a ban command.
|
||||
ban:
|
||||
defaultReasons:
|
||||
@@ -178,10 +168,9 @@ commands:
|
||||
# #
|
||||
# # WordList will ban users who use these words when first joining a room, so take caution when selecting them.
|
||||
# #
|
||||
# # For advanced usage, regex can also be used, see the following links for more information;
|
||||
# # - https://www.digitalocean.com/community/tutorials/an-introduction-to-regular-expressions
|
||||
# # - https://regexr.com/
|
||||
# # - https://regexone.com/
|
||||
# # The word list protection does not support regular expressions at this time.
|
||||
# # The configuration in the past stated support for Regex erroneously.
|
||||
# #
|
||||
# words:
|
||||
# - "LoReM"
|
||||
# - "IpSuM"
|
||||
@@ -196,6 +185,31 @@ commands:
|
||||
# # (users will always be banned if they say a bad word)
|
||||
# minutesBeforeTrusting: 20
|
||||
|
||||
# The room state backing store writes a copy of the room state for all protected
|
||||
# rooms to the data directory.
|
||||
# It is recommended to enable this option unless you deploy Draupnir close to the
|
||||
# homeserver and know that Draupnir is starting up quickly. If your homeserver can
|
||||
# respond quickly to Draupnir's requests for `/state` then you might not need this option.
|
||||
roomStateBackingStore:
|
||||
enabled: {{ matrix_bot_draupnir_enable_room_state_backing_store | to_json }}
|
||||
|
||||
# Safe mode provides recovery options for some failure modes when Draupnir
|
||||
# fails to start. For example, if the bot fails to resolve a room alias in
|
||||
# a watched list, or if the server has parted from a protected room and can't
|
||||
# find a way back in. Safe mode will provide different options to recover from
|
||||
# these. Such as unprotecting the room or unwatching the policy list.
|
||||
# By default Draupnir will boot into safe mode only when the failure mode
|
||||
# is recoverable.
|
||||
# It may be desirable to prevent the bot from starting into safe mode if you have
|
||||
# a pager system when Draupnir is down, as Draupnir could prevent your monitoring
|
||||
# system from identifying a failure to start.
|
||||
#safeMode:
|
||||
# # The option for entering safe mode when Draupnir fails to start up.
|
||||
# # - "RecoveryOnly" will only start the bot in safe mode when there are recovery options available. This is the default.
|
||||
# # - "Never" will never start the bot in safe mode when Draupnir fails to start normally.
|
||||
# # - "Always" will always start the bot in safe mode when Draupnir fails to start normally.
|
||||
# bootOption: RecoveryOnly
|
||||
|
||||
# Options for advanced monitoring of the health of the bot.
|
||||
health:
|
||||
# healthz options. These options are best for use in container environments
|
||||
@@ -227,6 +241,18 @@ health:
|
||||
# Defaults to 418.
|
||||
unhealthyStatus: 418
|
||||
|
||||
# Sentry options. Sentry is a tool used to receive/collate/triage runtime
|
||||
# errors and performance issues. Skip this section if you do not wish to use
|
||||
# Sentry.
|
||||
sentry:
|
||||
# The key used to upload Sentry data to the server.
|
||||
# dsn: "https://XXXXXXXXX@example.com/YYY
|
||||
|
||||
# Frequency of performance monitoring.
|
||||
# A number in [0.0, 1.0], where 0.0 means "don't bother with tracing"
|
||||
# and 1.0 means "trace performance at every opportunity".
|
||||
# tracesSampleRate: 0.5
|
||||
|
||||
{% if matrix_bot_draupnir_web_enabled %}
|
||||
# Options for exposing web APIs.
|
||||
web:
|
||||
@@ -238,7 +264,12 @@ web:
|
||||
|
||||
# The address to listen for requests on. Defaults to only the current
|
||||
# computer.
|
||||
address: 0.0.0.0
|
||||
address: "0.0.0.0"
|
||||
|
||||
# Alternative setting to open to the entire web. Be careful,
|
||||
# as this will increase your security perimeter:
|
||||
#
|
||||
# address: "0.0.0.0"
|
||||
|
||||
# A web API designed to intercept Matrix API
|
||||
# POST /_matrix/client/r0/rooms/{roomId}/report/{eventId}
|
||||
@@ -251,10 +282,13 @@ web:
|
||||
enabled: {{ matrix_bot_draupnir_abuse_reporting_enabled | to_json }}
|
||||
{% endif %}
|
||||
|
||||
# FIXME: This configuration option is currently broken in the playbook as admin APIs cannot
|
||||
# be accessed from containers. See https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3389
|
||||
# and https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3308
|
||||
# Whether or not to actively poll synapse for abuse reports, to be used
|
||||
# instead of intercepting client calls to synapse's abuse endpoint, when that
|
||||
# isn't possible/practical.
|
||||
pollReports: false
|
||||
#pollReports: false
|
||||
|
||||
# Whether or not new reports, received either by webapi or polling,
|
||||
# should be printed to our managementRoom.
|
||||
|
||||
@@ -163,7 +163,7 @@ matrix_bot_go_neb_storage_database: "{{
|
||||
# The access tokens that the bot uses to authenticate.
|
||||
# Generate one as described in
|
||||
# https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-dimension.md#access-token
|
||||
# via curl. With the element method, you might run into decryption problems (see https://github.com/matrix-org/go-neb#quick-start)
|
||||
# via curl. With the Element method, you might run into decryption problems (see https://github.com/matrix-org/go-neb#quick-start)
|
||||
matrix_bot_go_neb_clients: []
|
||||
# - UserID: "@goneb:{{ matrix_domain }}"
|
||||
# AccessToken: "MDASDASJDIASDJASDAFGFRGER"
|
||||
@@ -200,7 +200,7 @@ matrix_bot_go_neb_realms: []
|
||||
matrix_bot_go_neb_sessions: []
|
||||
# - SessionID: "your_github_session"
|
||||
# RealmID: "github_realm"
|
||||
# UserID: "@YOUR_USER_ID:{{ matrix_domain }}" # This needs to be the username of the person that's allowed to use the !github commands
|
||||
# UserID: "@alice:{{ matrix_domain }}" # This needs to be the username of the person that's allowed to use the !github commands
|
||||
# Config:
|
||||
# # Populate these fields by generating a "Personal Access Token" on github.com
|
||||
# AccessToken: "YOUR_GITHUB_ACCESS_TOKEN"
|
||||
@@ -286,7 +286,7 @@ matrix_bot_go_neb_services: []
|
||||
# UserID: "@another_goneb:{{ matrix_domain }}"
|
||||
# Config:
|
||||
# RealmID: "github_realm"
|
||||
# ClientUserID: "@YOUR_USER_ID:{{ matrix_domain }}" # needs to be an authenticated user so Go-NEB can create webhooks. Check the UserID field in the github_realm in matrix_bot_go_neb_sessions.
|
||||
# ClientUserID: "@alice:{{ matrix_domain }}" # needs to be an authenticated user so Go-NEB can create webhooks. Check the UserID field in the github_realm in matrix_bot_go_neb_sessions.
|
||||
# Rooms:
|
||||
# "!qporfwt:example.com":
|
||||
# Repos:
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
---
|
||||
# honoroit is a helpdesk bot
|
||||
# Honoroit is a helpdesk bot
|
||||
# Project source code URL: https://github.com/etkecc/honoroit
|
||||
|
||||
matrix_bot_honoroit_enabled: true
|
||||
|
||||
# The hostname at which honoroit is served.
|
||||
# The hostname at which Honoroit is served.
|
||||
matrix_bot_honoroit_hostname: ''
|
||||
|
||||
# The path at which honoroit is exposed.
|
||||
# The path at which Honoroit is exposed.
|
||||
# This value must either be `/` or not end with a slash (e.g. `/honoroit`).
|
||||
matrix_bot_honoroit_path_prefix: /
|
||||
|
||||
# The path at which honoroit will expose metrics
|
||||
# The path at which Honoroit will expose metrics
|
||||
# This value must either be `/` or not end with a slash (e.g. `/metrics`).
|
||||
matrix_bot_honoroit_metrics_path: /metrics
|
||||
|
||||
@@ -161,12 +161,12 @@ matrix_bot_honoroit_redmine_new_status_id: '' # new status ID (e.g. 1)
|
||||
matrix_bot_honoroit_redmine_in_progress_status_id: '' # in progress status ID (e.g. 2)
|
||||
matrix_bot_honoroit_redmine_done_status_id: '' # done status ID (e.g. 3)
|
||||
|
||||
# A list of whitelisted users allowed to use/invite honoroit
|
||||
# A list of whitelisted users allowed to use/invite a Honoroit bot
|
||||
# If not defined, everyone is allowed.
|
||||
# Example set of rules:
|
||||
# matrix_bot_honoroit_allowedusers:
|
||||
# - @someone:example.com
|
||||
# - @another:example.com
|
||||
# - @alice:example.com
|
||||
# - @bob:example.com
|
||||
# - @bot.*:example.com
|
||||
# - @*:example.net
|
||||
matrix_bot_honoroit_allowedusers:
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_bot_honoroit_requires_restart: true
|
||||
|
||||
- name: Ensure honoroit paths exist
|
||||
- name: Ensure Honoroit paths exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
@@ -40,7 +40,7 @@
|
||||
- {path: "{{ matrix_bot_honoroit_docker_src_files_path }}", when: true}
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure honoroit support files installed
|
||||
- name: Ensure Honoroit support files installed
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||
dest: "{{ matrix_bot_honoroit_config_path }}/{{ item }}"
|
||||
@@ -51,7 +51,7 @@
|
||||
- env
|
||||
- labels
|
||||
|
||||
- name: Ensure honoroit image is pulled
|
||||
- name: Ensure Honoroit image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_honoroit_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
@@ -63,7 +63,7 @@
|
||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure honoroit repository is present on self-build
|
||||
- name: Ensure Honoroit repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_honoroit_docker_repo }}"
|
||||
version: "{{ matrix_bot_honoroit_docker_repo_version }}"
|
||||
@@ -74,7 +74,7 @@
|
||||
register: matrix_bot_honoroit_git_pull_results
|
||||
when: "matrix_bot_honoroit_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure honoroit image is built
|
||||
- name: Ensure Honoroit image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_honoroit_docker_image }}"
|
||||
source: build
|
||||
@@ -86,7 +86,7 @@
|
||||
pull: true
|
||||
when: "matrix_bot_honoroit_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure honoroit container network is created
|
||||
- name: Ensure Honoroit container network is created
|
||||
community.general.docker_network:
|
||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||
name: "{{ matrix_bot_honoroit_container_network }}"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service"
|
||||
state: absent
|
||||
|
||||
- name: Ensure Matrix honoroit paths don't exist
|
||||
- name: Ensure Matrix Honoroit paths don't exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_bot_honoroit_base_path }}"
|
||||
state: absent
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
|
||||
- name: Fail if required honoroit settings not defined
|
||||
- name: Fail if required Honoroit settings not defined
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item.name }}`).
|
||||
|
||||
@@ -20,12 +20,19 @@ matrix_bot_matrix_registration_bot_config_path: "{{ matrix_bot_matrix_registrati
|
||||
matrix_bot_matrix_registration_bot_data_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/data"
|
||||
|
||||
matrix_bot_matrix_registration_bot_bot_server: "{{ matrix_homeserver_url }}"
|
||||
matrix_bot_matrix_registration_bot_api_base_url: "{{ matrix_homeserver_url }}"
|
||||
|
||||
# The bot's username. This user needs to be created manually beforehand.
|
||||
# Also see `matrix_bot_matrix_registration_bot_user_password`.
|
||||
matrix_bot_matrix_registration_bot_matrix_user_id_localpart: "bot.matrix-registration-bot"
|
||||
|
||||
# The bot's password (can also be used to login via a client like element)
|
||||
matrix_bot_matrix_registration_bot_matrix_user_id: '@{{ matrix_bot_matrix_registration_bot_matrix_user_id_localpart }}:{{ matrix_domain }}'
|
||||
|
||||
# The bot's password (can also be used to login via a client like Element Web)
|
||||
matrix_bot_matrix_registration_bot_bot_password: ''
|
||||
|
||||
# Homeserver base URL
|
||||
matrix_bot_matrix_registration_bot_api_base_url: "{{ matrix_homeserver_url }}"
|
||||
|
||||
# Optional variable that only needs to be set if the bot account is not admin
|
||||
# Needs to be a valid access token of an admin account
|
||||
matrix_bot_matrix_registration_bot_api_token: ''
|
||||
@@ -51,11 +58,3 @@ matrix_bot_matrix_registration_bot_systemd_required_services_list_custom: []
|
||||
|
||||
# List of systemd services that matrix-bot-matrix-registration-bot.service wants
|
||||
matrix_bot_matrix_registration_bot_systemd_wanted_services_list: []
|
||||
|
||||
# The bot's username. This user needs to be created manually beforehand.
|
||||
# Also see `matrix_bot_matrix_registration_bot_user_password`.
|
||||
matrix_bot_matrix_registration_bot_matrix_user_id_localpart: "bot.matrix-registration-bot"
|
||||
|
||||
matrix_bot_matrix_registration_bot_matrix_user_id: '@{{ matrix_bot_matrix_registration_bot_matrix_user_id_localpart }}:{{ matrix_domain }}'
|
||||
|
||||
matrix_bot_matrix_registration_bot_matrix_homeserver_url: ""
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
with_items:
|
||||
- {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}", when: "{{ matrix_bot_matrix_registration_bot_container_image_self_build }}"}
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure matrix-registration-bot configuration file created
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/config/config.yml.j2"
|
||||
src: "{{ role_path }}/templates/config.yml.j2"
|
||||
dest: "{{ matrix_bot_matrix_registration_bot_config_path }}/config.yml"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
@@ -33,28 +33,28 @@
|
||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure matrix-registration-bot repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_matrix_registration_bot_docker_repo }}"
|
||||
version: "{{ matrix_bot_matrix_registration_bot_docker_repo_version }}"
|
||||
dest: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
become: true
|
||||
become_user: "{{ matrix_user_username }}"
|
||||
register: matrix_bot_matrix_registration_bot_git_pull_results
|
||||
when: "matrix_bot_matrix_registration_bot_container_image_self_build | bool"
|
||||
- when: matrix_bot_matrix_registration_bot_container_image_self_build | bool
|
||||
block:
|
||||
- name: Ensure matrix-registration-bot repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_matrix_registration_bot_docker_repo }}"
|
||||
version: "{{ matrix_bot_matrix_registration_bot_docker_repo_version }}"
|
||||
dest: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
become: true
|
||||
become_user: "{{ matrix_user_username }}"
|
||||
register: matrix_bot_matrix_registration_bot_git_pull_results
|
||||
|
||||
- name: Ensure matrix-registration-bot image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_matrix_registration_bot_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_bot_matrix_registration_bot_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_bot_matrix_registration_bot_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
|
||||
pull: true
|
||||
when: "matrix_bot_matrix_registration_bot_container_image_self_build | bool"
|
||||
- name: Ensure matrix-registration-bot image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_matrix_registration_bot_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_bot_matrix_registration_bot_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_bot_matrix_registration_bot_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
|
||||
pull: true
|
||||
|
||||
- name: Ensure matrix-registration-bot container network is created
|
||||
community.general.docker_network:
|
||||
|
||||
@@ -7,12 +7,14 @@
|
||||
when: "vars[item] == ''"
|
||||
with_items:
|
||||
- "matrix_bot_matrix_registration_bot_bot_password"
|
||||
- "matrix_bot_matrix_registration_bot_matrix_homeserver_url"
|
||||
- "matrix_bot_matrix_registration_bot_api_base_url"
|
||||
|
||||
- name: (Deprecation) Catch and report old settings
|
||||
- name: (Deprecation) Catch and report renamed settings
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Your configuration contains a variable, which is deprecated - Please check the documentation on how to configure the matrix-registration-bot.
|
||||
when: "item in vars"
|
||||
Your configuration contains a variable, which now has a different name.
|
||||
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
|
||||
when: "item.old in vars"
|
||||
with_items:
|
||||
- "matrix_bot_matrix_registration_bot_bot_access_token"
|
||||
- {'old': 'matrix_bot_matrix_registration_bot_bot_access_token', 'new': '<removed>'}
|
||||
- {'old': 'matrix_bot_matrix_registration_bot_matrix_homeserver_url', 'new': 'matrix_bot_matrix_registration_bot_api_base_url'}
|
||||
|
||||
@@ -6,8 +6,8 @@ bot:
|
||||
api:
|
||||
# API endpoint of the registration tokens
|
||||
base_url: {{ matrix_bot_matrix_registration_bot_api_base_url|to_json }}
|
||||
# Access token of an administrator on the server
|
||||
{% if matrix_bot_matrix_registration_bot_api_token | length > 0 %}
|
||||
# Access token of an administrator on the server
|
||||
token: {{ matrix_bot_matrix_registration_bot_api_token|to_json }}
|
||||
{% endif %}
|
||||
|
||||
@@ -6,7 +6,7 @@ matrix_bot_matrix_reminder_bot_enabled: true
|
||||
|
||||
matrix_bot_matrix_reminder_bot_container_image_self_build: false
|
||||
matrix_bot_matrix_reminder_bot_docker_repo: "https://github.com/anoadragon453/matrix-reminder-bot.git"
|
||||
matrix_bot_matrix_reminder_bot_docker_repo_version: "{{ matrix_bot_matrix_reminder_bot_version }}"
|
||||
matrix_bot_matrix_reminder_bot_docker_repo_version: "{{ 'master' if matrix_bot_matrix_reminder_bot_version == 'latest' else matrix_bot_matrix_reminder_bot_version }}"
|
||||
matrix_bot_matrix_reminder_bot_docker_src_files_path: "{{ matrix_base_data_path }}/matrix-reminder-bot/docker-src"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/anoadragon453/matrix-reminder-bot
|
||||
|
||||
@@ -17,18 +17,34 @@ matrix_bot_maubot_path_prefix: /_matrix/maubot
|
||||
|
||||
matrix_bot_maubot_container_image_self_build: false
|
||||
matrix_bot_maubot_docker_repo: "https://mau.dev/maubot/maubot.git"
|
||||
matrix_bot_maubot_docker_src_files_path: "{{ matrix_bot_maubot_base_path }}/docker-src"
|
||||
matrix_bot_maubot_docker_repo_version: "{{ 'master' if matrix_bot_maubot_version == 'latest' else matrix_bot_maubot_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/maubot/maubot
|
||||
matrix_bot_maubot_version: v0.5.0
|
||||
matrix_bot_maubot_version: v0.5.1
|
||||
matrix_bot_maubot_docker_image: "{{ matrix_bot_maubot_docker_image_name_prefix }}maubot/maubot:{{ matrix_bot_maubot_version }}"
|
||||
matrix_bot_maubot_docker_image_name_prefix: "{{ 'localhost/' if matrix_bot_maubot_container_image_self_build else 'dock.mau.dev/' }}"
|
||||
matrix_bot_maubot_docker_image_force_pull: "{{ matrix_bot_maubot_docker_image.endswith(':latest') }}"
|
||||
|
||||
# matrix_bot_maubot_docker_image_customized is the name of the locally built maubot image
|
||||
# which adds various customizations on top of the original (upstream) maubot image.
|
||||
# This image will be based on the upstream `matrix_bot_maubot_docker_image` image, only if `matrix_bot_maubot_container_image_customizations_enabled: true`.
|
||||
matrix_bot_maubot_docker_image_customized: "localhost/maubot/maubot:{{ matrix_bot_maubot_version }}-customized"
|
||||
|
||||
# Controls whether the customized image (`matrix_bot_maubot_docker_image_customized`) is to be force-built without layer caching enabled.
|
||||
matrix_bot_maubot_docker_image_customized_build_nocache: false
|
||||
|
||||
# Controls whether the customized image (`matrix_bot_maubot_docker_image_customized`) is to be built, even if it already exists.
|
||||
# Related to: matrix_bot_maubot_docker_image_customized_build_nocache
|
||||
matrix_bot_maubot_docker_image_customized_force_source: "{{ matrix_bot_maubot_docker_image_customized_build_nocache }}"
|
||||
|
||||
# matrix_bot_maubot_docker_image_final holds the name of the maubot image to run depending on whether or not customizations are enabled.
|
||||
matrix_bot_maubot_docker_image_final: "{{ matrix_bot_maubot_docker_image_customized if matrix_bot_maubot_container_image_customizations_enabled else matrix_bot_maubot_docker_image }} "
|
||||
|
||||
matrix_bot_maubot_base_path: "{{ matrix_base_data_path }}/maubot"
|
||||
matrix_bot_maubot_data_path: "{{ matrix_bot_maubot_base_path }}/data"
|
||||
matrix_bot_maubot_config_path: "{{ matrix_bot_maubot_base_path }}/config"
|
||||
matrix_bot_maubot_docker_src_files_path: "{{ matrix_bot_maubot_base_path }}/docker-src"
|
||||
matrix_bot_maubot_customized_docker_src_files_path: "{{ matrix_bot_maubot_base_path }}/customized-docker-src"
|
||||
|
||||
matrix_bot_maubot_bot_server_public_url: "{{ matrix_bot_maubot_scheme }}://{{ matrix_bot_maubot_hostname }}"
|
||||
matrix_bot_maubot_bot_server_base_path: "{{ matrix_bot_maubot_path_prefix }}/v1"
|
||||
@@ -87,6 +103,30 @@ matrix_bot_maubot_container_additional_networks: "{{ matrix_bot_maubot_container
|
||||
matrix_bot_maubot_container_additional_networks_auto: []
|
||||
matrix_bot_maubot_container_additional_networks_custom: []
|
||||
|
||||
|
||||
# matrix_bot_maubot_container_image_customizations_enabled controls whether a customized maubot image will be built.
|
||||
#
|
||||
# We toggle this variable to `true` when certain features which require a custom build are enabled.
|
||||
# Feel free to toggle this to `true` yourself and specify build steps in `matrix_bot_maubot_container_image_customizations_dockerfile_body_custom`.
|
||||
#
|
||||
# See:
|
||||
# - `roles/custom/matrix-bot-maubot/templates/maubot/customizations/Dockerfile.j2`
|
||||
# - `matrix_bot_maubot_container_image_customizations_dockerfile_body_custom`
|
||||
# - `matrix_bot_maubot_docker_image_customized`
|
||||
# - `matrix_bot_maubot_docker_image_final`
|
||||
matrix_bot_maubot_container_image_customizations_enabled: false
|
||||
|
||||
# matrix_bot_maubot_container_image_customizations_dockerfile_body contains your custom Dockerfile steps
|
||||
# for building your customized maubot image based on the original (upstream) image (`matrix_bot_maubot_docker_image`).
|
||||
# A `FROM …` clause is included automatically so you don't have to.
|
||||
#
|
||||
# Example:
|
||||
# matrix_bot_maubot_container_image_customizations_dockerfile_body_custom: |
|
||||
# RUN echo 'This is a custom step for building the customized container image for maubot.'
|
||||
# RUN echo 'You can override matrix_bot_maubot_container_image_customizations_dockerfile_body_custom to add your own steps.'
|
||||
# RUN echo 'You do NOT need to include a FROM clause yourself.'
|
||||
matrix_bot_maubot_container_image_customizations_dockerfile_body_custom: ''
|
||||
|
||||
# matrix_bot_maubot_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.
|
||||
#
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
- {path: "{{ matrix_bot_maubot_data_path }}/dbs", when: true}
|
||||
- {path: "{{ matrix_bot_maubot_data_path }}/trash", when: true}
|
||||
- {path: "{{ matrix_bot_maubot_docker_src_files_path }}", when: "{{ matrix_bot_maubot_container_image_self_build }}"}
|
||||
- {path: "{{ matrix_bot_maubot_customized_docker_src_files_path }}", when: "{{ matrix_bot_maubot_container_image_customizations_enabled }}"}
|
||||
when: "item.when|bool"
|
||||
|
||||
- name: Ensure maubot configuration file created
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/config/config.yaml.j2"
|
||||
src: "{{ role_path }}/templates/config.yaml.j2"
|
||||
dest: "{{ matrix_bot_maubot_config_path }}/config.yaml"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
@@ -37,28 +38,49 @@
|
||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure maubot repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_maubot_docker_repo }}"
|
||||
version: "{{ matrix_bot_maubot_docker_repo_version }}"
|
||||
dest: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
become: true
|
||||
become_user: "{{ matrix_user_username }}"
|
||||
register: matrix_bot_maubot_git_pull_results
|
||||
when: "matrix_bot_maubot_container_image_self_build|bool"
|
||||
- when: matrix_bot_maubot_container_image_self_build | bool
|
||||
block:
|
||||
- name: Ensure maubot repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_maubot_docker_repo }}"
|
||||
version: "{{ matrix_bot_maubot_docker_repo_version }}"
|
||||
dest: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
become: true
|
||||
become_user: "{{ matrix_user_username }}"
|
||||
register: matrix_bot_maubot_git_pull_results
|
||||
|
||||
- name: Ensure maubot image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_maubot_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_bot_maubot_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_bot_maubot_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
||||
pull: true
|
||||
when: "matrix_bot_maubot_container_image_self_build|bool"
|
||||
- name: Ensure maubot image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_maubot_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_bot_maubot_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_bot_maubot_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
||||
pull: true
|
||||
|
||||
- when: "matrix_bot_maubot_container_image_customizations_enabled | bool"
|
||||
block:
|
||||
- name: Ensure customizations Dockerfile is created
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/customizations/Dockerfile.j2"
|
||||
dest: "{{ matrix_bot_maubot_customized_docker_src_files_path }}/Dockerfile"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
mode: 0640
|
||||
register: matrix_bot_maubot_container_image_customizations_dockerfile_result
|
||||
|
||||
- name: Ensure customized Docker image for maubot is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_maubot_docker_image_customized }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_bot_maubot_container_image_customizations_dockerfile_result.changed or matrix_bot_maubot_docker_image_customized_force_source }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_bot_maubot_customized_docker_src_files_path }}"
|
||||
nocache: "{{ matrix_bot_maubot_docker_image_customized_build_nocache }}"
|
||||
|
||||
- name: Ensure maubot support files installed
|
||||
ansible.builtin.template:
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
FROM {{ matrix_bot_maubot_docker_image }}
|
||||
|
||||
{{ matrix_bot_maubot_container_image_customizations_dockerfile_body_custom }}
|
||||
@@ -16,6 +16,10 @@ 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 --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-maubot 2>/dev/null || true'
|
||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-maubot 2>/dev/null || true'
|
||||
|
||||
{#
|
||||
We mount a tmpfs at /tmp, because some maubot plugins may wish to write to it.
|
||||
It makes sense to provide at least some sort of temporary storage.
|
||||
#}
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--rm \
|
||||
--name=matrix-bot-maubot \
|
||||
@@ -25,6 +29,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--cap-drop=ALL \
|
||||
--mount type=bind,src={{ matrix_bot_maubot_config_path }},dst=/config,ro \
|
||||
--mount type=bind,src={{ matrix_bot_maubot_data_path }},dst=/data \
|
||||
--tmpfs=/tmp:rw,noexec,nosuid,size=1024m \
|
||||
--label-file={{ matrix_bot_maubot_base_path }}/labels \
|
||||
{% for arg in matrix_bot_maubot_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
@@ -33,7 +38,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
{% if matrix_bot_maubot_container_management_interface_http_bind_port %}
|
||||
-p {{ matrix_bot_maubot_container_management_interface_http_bind_port }}:{{ matrix_bot_maubot_server_port }} \
|
||||
{% endif %}
|
||||
{{ matrix_bot_maubot_docker_image }} \
|
||||
{{ matrix_bot_maubot_docker_image_final }} \
|
||||
python3 -m maubot -c /config/config.yaml --no-update
|
||||
|
||||
{% for network in matrix_bot_maubot_container_additional_networks %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
matrix_bot_mjolnir_enabled: true
|
||||
|
||||
# renovate: datasource=docker depName=matrixdotorg/mjolnir
|
||||
matrix_bot_mjolnir_version: "v1.8.3"
|
||||
matrix_bot_mjolnir_version: "v1.9.1"
|
||||
|
||||
matrix_bot_mjolnir_container_image_self_build: false
|
||||
matrix_bot_mjolnir_container_image_self_build_repo: "https://github.com/matrix-org/mjolnir.git"
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
---
|
||||
# postmoogle is an email to Matrix bot
|
||||
# Project source code URL: https://github.com/etkecc/postmoogle
|
||||
|
||||
matrix_bot_postmoogle_enabled: true
|
||||
|
||||
matrix_bot_postmoogle_container_image_self_build: false
|
||||
matrix_bot_postmoogle_docker_repo: "https://github.com/etkecc/postmoogle.git"
|
||||
matrix_bot_postmoogle_docker_repo_version: "{{ 'main' if matrix_bot_postmoogle_version == 'latest' else matrix_bot_postmoogle_version }}"
|
||||
matrix_bot_postmoogle_docker_src_files_path: "{{ matrix_base_data_path }}/postmoogle/docker-src"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/etkecc/postmoogle
|
||||
matrix_bot_postmoogle_version: v0.9.21
|
||||
matrix_bot_postmoogle_docker_image: "{{ matrix_bot_postmoogle_docker_image_name_prefix }}etkecc/postmoogle:{{ matrix_bot_postmoogle_version }}"
|
||||
matrix_bot_postmoogle_docker_image_name_prefix: "{{ 'localhost/' if matrix_bot_postmoogle_container_image_self_build else 'ghcr.io/' }}"
|
||||
matrix_bot_postmoogle_docker_image_force_pull: "{{ matrix_bot_postmoogle_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_bot_postmoogle_base_path: "{{ matrix_base_data_path }}/postmoogle"
|
||||
matrix_bot_postmoogle_config_path: "{{ matrix_bot_postmoogle_base_path }}/config"
|
||||
matrix_bot_postmoogle_data_path: "{{ matrix_bot_postmoogle_base_path }}/data"
|
||||
|
||||
matrix_bot_postmoogle_container_network: ""
|
||||
|
||||
matrix_bot_postmoogle_container_additional_networks: "{{ matrix_bot_postmoogle_container_additional_networks_auto + matrix_bot_postmoogle_container_additional_networks_custom }}"
|
||||
matrix_bot_postmoogle_container_additional_networks_auto: []
|
||||
matrix_bot_postmoogle_container_additional_networks_custom: []
|
||||
|
||||
# A list of extra arguments to pass to the container
|
||||
matrix_bot_postmoogle_container_extra_arguments: []
|
||||
|
||||
# List of systemd services that matrix-bot-postmoogle.service depends on
|
||||
matrix_bot_postmoogle_systemd_required_services_list: "{{ matrix_bot_postmoogle_systemd_required_services_list_default + matrix_bot_postmoogle_systemd_required_services_list_auto + matrix_bot_postmoogle_systemd_required_services_list_custom }}"
|
||||
matrix_bot_postmoogle_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
|
||||
matrix_bot_postmoogle_systemd_required_services_list_auto: []
|
||||
matrix_bot_postmoogle_systemd_required_services_list_custom: []
|
||||
|
||||
# List of systemd services that matrix-bot-postmoogle.service wants
|
||||
matrix_bot_postmoogle_systemd_wanted_services_list: []
|
||||
|
||||
# Database-related configuration fields.
|
||||
#
|
||||
# To use SQLite, stick to these defaults.
|
||||
#
|
||||
# To use Postgres:
|
||||
# - change the engine (`matrix_bot_postmoogle_database_engine: 'postgres'`)
|
||||
# - adjust your database credentials via the `matrix_bot_postmoogle_database_*` variables
|
||||
matrix_bot_postmoogle_database_engine: 'sqlite'
|
||||
|
||||
matrix_bot_postmoogle_sqlite_database_path_local: "{{ matrix_bot_postmoogle_data_path }}/bot.db"
|
||||
matrix_bot_postmoogle_sqlite_database_path_in_container: "/data/bot.db"
|
||||
|
||||
matrix_bot_postmoogle_database_username: 'postmoogle'
|
||||
matrix_bot_postmoogle_database_password: 'some-password'
|
||||
matrix_bot_postmoogle_database_hostname: ''
|
||||
matrix_bot_postmoogle_database_port: 5432
|
||||
matrix_bot_postmoogle_database_name: 'postmoogle'
|
||||
matrix_bot_postmoogle_database_sslmode: disable
|
||||
|
||||
matrix_bot_postmoogle_database_connection_string: 'postgres://{{ matrix_bot_postmoogle_database_username }}:{{ matrix_bot_postmoogle_database_password }}@{{ matrix_bot_postmoogle_database_hostname }}:{{ matrix_bot_postmoogle_database_port }}/{{ matrix_bot_postmoogle_database_name }}?sslmode={{ matrix_bot_postmoogle_database_sslmode }}'
|
||||
|
||||
matrix_bot_postmoogle_storage_database: "{{
|
||||
{
|
||||
'sqlite': matrix_bot_postmoogle_sqlite_database_path_in_container,
|
||||
'postgres': matrix_bot_postmoogle_database_connection_string,
|
||||
}[matrix_bot_postmoogle_database_engine]
|
||||
}}"
|
||||
|
||||
matrix_bot_postmoogle_database_dialect: "{{
|
||||
{
|
||||
'sqlite': 'sqlite3',
|
||||
'postgres': 'postgres',
|
||||
}[matrix_bot_postmoogle_database_engine]
|
||||
}}"
|
||||
|
||||
|
||||
# The bot's username. This user needs to be created manually beforehand.
|
||||
# Also see `matrix_bot_postmoogle_password` or `matrix_bot_postmoogle_sharedsecret`
|
||||
matrix_bot_postmoogle_login: "postmoogle"
|
||||
|
||||
# The password that the bot uses to authenticate.
|
||||
matrix_bot_postmoogle_password: ''
|
||||
|
||||
# Alternative to password - shared secret requires matrix_bot_postmoogle_login to be MXID
|
||||
matrix_bot_postmoogle_sharedsecret: ''
|
||||
|
||||
matrix_bot_postmoogle_homeserver: ""
|
||||
|
||||
# Command prefix
|
||||
matrix_bot_postmoogle_prefix: '!pm'
|
||||
|
||||
# Max email size in megabytes, including attachments
|
||||
matrix_bot_postmoogle_maxsize: '1024'
|
||||
|
||||
# Optional SMTP relay mode
|
||||
matrix_bot_postmoogle_relay_host: ''
|
||||
matrix_bot_postmoogle_relay_port: ''
|
||||
matrix_bot_postmoogle_relay_username: ''
|
||||
matrix_bot_postmoogle_relay_password: ''
|
||||
|
||||
# A list of admins
|
||||
# Example set of rules:
|
||||
# matrix_bot_postmoogle_admins:
|
||||
# - '@someone:example.com'
|
||||
# - '@another:example.com'
|
||||
# - '@bot.*:example.com'
|
||||
# - '@*:example.net'
|
||||
matrix_bot_postmoogle_admins: "{{ [matrix_admin] if matrix_admin else [] }}"
|
||||
|
||||
# Sentry DSN. Deprecated, use matrix_bot_postmoogle_monitoring_sentry_dsn
|
||||
matrix_bot_postmoogle_sentry: ''
|
||||
|
||||
# Sentry integration
|
||||
matrix_bot_postmoogle_monitoring_sentry_dsn: "{{ matrix_bot_postmoogle_sentry }}"
|
||||
matrix_bot_postmoogle_monitoring_sentry_rate: 20
|
||||
|
||||
# healthchecks.io integration
|
||||
matrix_bot_postmoogle_monitoring_healthchecks_uuid: ''
|
||||
matrix_bot_postmoogle_monitoring_healthchecks_duration: 60
|
||||
|
||||
# Log level
|
||||
matrix_bot_postmoogle_loglevel: 'INFO'
|
||||
|
||||
# deprecated, use matrix_bot_postmoogle_domains
|
||||
matrix_bot_postmoogle_domain: "{{ matrix_server_fqn_matrix }}"
|
||||
|
||||
matrix_bot_postmoogle_domains:
|
||||
- "{{ matrix_bot_postmoogle_domain }}" # backward compatibility
|
||||
|
||||
# Password (passphrase) to encrypt account data
|
||||
matrix_bot_postmoogle_data_secret: ""
|
||||
|
||||
# in-container ports
|
||||
matrix_bot_postmoogle_port: '2525'
|
||||
matrix_bot_postmoogle_tls_port: '25587'
|
||||
|
||||
# on-host ports
|
||||
matrix_bot_postmoogle_smtp_host_bind_port: '25'
|
||||
matrix_bot_postmoogle_submission_host_bind_port: '587'
|
||||
|
||||
### SSL
|
||||
## on-host SSL dir
|
||||
matrix_bot_postmoogle_ssl_path: ""
|
||||
|
||||
## in-container SSL paths
|
||||
# matrix_bot_postmoogle_tls_cert is the SSL certificates' certificates.
|
||||
# This var is likely set via group_vars/matrix_servers, so you don't need to set certs manually.
|
||||
# If you do need to set it manually, note that this is an in-container path.
|
||||
# To mount a certificates volumes into the container, use matrix_bot_postmoogle_ssl_path
|
||||
# Example value: /ssl/live/{{ matrix_bot_postmoogle_domain }}/fullchain.pem
|
||||
matrix_bot_postmoogle_tls_cert: ""
|
||||
|
||||
# matrix_bot_postmoogle_tls_key is the SSL certificates' keys.
|
||||
# This var is likely set via group_vars/matrix_servers, so you don't need to set keys manually.
|
||||
# If you do need to set it manually, note that this is an in-container path.
|
||||
# To mount a certificates volumes into the container, use matrix_bot_postmoogle_ssl_path
|
||||
# Example value: /ssl/live/{{ matrix_bot_postmoogle_domain }}/privkey.pem
|
||||
matrix_bot_postmoogle_tls_key: ""
|
||||
|
||||
# Mandatory TLS, even on plain SMTP port
|
||||
matrix_bot_postmoogle_tls_required: false
|
||||
|
||||
# trusted proxies
|
||||
matrix_bot_postmoogle_proxies: []
|
||||
|
||||
# known forwarders
|
||||
matrix_bot_postmoogle_mailboxes_forwarded: []
|
||||
|
||||
# reserved mailboxes
|
||||
matrix_bot_postmoogle_mailboxes_reserved: []
|
||||
|
||||
# mailbox activation flow
|
||||
matrix_bot_postmoogle_mailboxes_activation: none
|
||||
|
||||
# Additional environment variables to pass to the postmoogle container
|
||||
#
|
||||
# Example:
|
||||
# matrix_bot_postmoogle_environment_variables_extension: |
|
||||
# postmoogle_TEXT_DONE=Done
|
||||
matrix_bot_postmoogle_environment_variables_extension: ''
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
- when: "matrix_bot_postmoogle_database_engine == 'postgres'"
|
||||
block:
|
||||
- name: Check if an SQLite database already exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_bot_postmoogle_sqlite_database_path_local }}"
|
||||
register: matrix_bot_postmoogle_sqlite_database_path_local_stat_result
|
||||
|
||||
- when: "matrix_bot_postmoogle_sqlite_database_path_local_stat_result.stat.exists | bool"
|
||||
block:
|
||||
- ansible.builtin.include_role:
|
||||
name: galaxy/postgres
|
||||
tasks_from: migrate_db_to_postgres
|
||||
vars:
|
||||
postgres_db_migration_request:
|
||||
src: "{{ matrix_bot_postmoogle_sqlite_database_path_local }}"
|
||||
dst: "{{ matrix_bot_postmoogle_database_connection_string }}"
|
||||
caller: "{{ role_path | basename }}"
|
||||
engine_variable_name: 'matrix_bot_postmoogle_database_engine'
|
||||
engine_old: 'sqlite'
|
||||
systemd_services_to_stop: ['matrix-bot-postmoogle.service']
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_bot_postmoogle_requires_restart: true
|
||||
|
||||
- name: Ensure postmoogle paths exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- {path: "{{ matrix_bot_postmoogle_config_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_postmoogle_data_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_postmoogle_docker_src_files_path }}", when: matrix_bot_postmoogle_container_image_self_build}
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure postmoogle environment variables file created
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/env.j2"
|
||||
dest: "{{ matrix_bot_postmoogle_config_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
mode: 0640
|
||||
|
||||
- name: Ensure postmoogle image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_postmoogle_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_bot_postmoogle_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_bot_postmoogle_docker_image_force_pull }}"
|
||||
when: "not matrix_bot_postmoogle_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
|
||||
|
||||
- name: Ensure postmoogle repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_bot_postmoogle_docker_repo }}"
|
||||
version: "{{ matrix_bot_postmoogle_docker_repo_version }}"
|
||||
dest: "{{ matrix_bot_postmoogle_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
become: true
|
||||
become_user: "{{ matrix_user_username }}"
|
||||
register: matrix_bot_postmoogle_git_pull_results
|
||||
when: "matrix_bot_postmoogle_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure postmoogle image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_bot_postmoogle_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_bot_postmoogle_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_bot_postmoogle_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_bot_postmoogle_docker_src_files_path }}"
|
||||
pull: true
|
||||
when: "matrix_bot_postmoogle_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure postmoogle container network is created
|
||||
community.general.docker_network:
|
||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||
name: "{{ matrix_bot_postmoogle_container_network }}"
|
||||
driver: bridge
|
||||
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
|
||||
|
||||
- name: Ensure matrix-bot-postmoogle.service installed
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-bot-postmoogle.service.j2"
|
||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
|
||||
mode: 0644
|
||||
register: matrix_bot_postmoogle_systemd_service_result
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Fail if required Postmoogle settings not defined
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item.name }}`).
|
||||
when: "item.when | bool and vars[item.name] == ''"
|
||||
with_items:
|
||||
- {'name': 'matrix_bot_postmoogle_password', when: true}
|
||||
- {'name': 'matrix_bot_postmoogle_container_network', when: true}
|
||||
- {'name': 'matrix_bot_postmoogle_homeserver', when: true}
|
||||
- {'name': 'matrix_bot_postmoogle_database_hostname', when: "{{ matrix_bot_postmoogle_database_engine == 'postgres' }}"}
|
||||
@@ -1,31 +0,0 @@
|
||||
POSTMOOGLE_LOGIN={{ matrix_bot_postmoogle_login }}
|
||||
POSTMOOGLE_PASSWORD={{ matrix_bot_postmoogle_password }}
|
||||
POSTMOOGLE_SHAREDSECRET={{ matrix_bot_postmoogle_sharedsecret }}
|
||||
POSTMOOGLE_HOMESERVER={{ matrix_bot_postmoogle_homeserver }}
|
||||
POSTMOOGLE_DOMAINS={{ matrix_bot_postmoogle_domains | join(' ') }}
|
||||
POSTMOOGLE_PORT={{ matrix_bot_postmoogle_port }}
|
||||
POSTMOOGLE_DB_DSN={{ matrix_bot_postmoogle_database_connection_string }}
|
||||
POSTMOOGLE_DB_DIALECT={{ matrix_bot_postmoogle_database_dialect }}
|
||||
POSTMOOGLE_PREFIX={{ matrix_bot_postmoogle_prefix }}
|
||||
POSTMOOGLE_MAXSIZE={{ matrix_bot_postmoogle_maxsize }}
|
||||
POSTMOOGLE_LOGLEVEL={{ matrix_bot_postmoogle_loglevel }}
|
||||
POSTMOOGLE_ADMINS={{ matrix_bot_postmoogle_admins | join(' ') }}
|
||||
POSTMOOGLE_TLS_PORT={{ matrix_bot_postmoogle_tls_port }}
|
||||
POSTMOOGLE_TLS_CERT={{ matrix_bot_postmoogle_tls_cert }}
|
||||
POSTMOOGLE_TLS_KEY={{ matrix_bot_postmoogle_tls_key }}
|
||||
POSTMOOGLE_TLS_REQUIRED={{ matrix_bot_postmoogle_tls_required }}
|
||||
POSTMOOGLE_DATA_SECRET={{ matrix_bot_postmoogle_data_secret }}
|
||||
POSTMOOGLE_PROXIES={{ matrix_bot_postmoogle_proxies | join(' ') }}
|
||||
POSTMOOGLE_RELAY_HOST={{ matrix_bot_postmoogle_relay_host }}
|
||||
POSTMOOGLE_RELAY_PORT={{ matrix_bot_postmoogle_relay_port }}
|
||||
POSTMOOGLE_RELAY_USERNAME={{ matrix_bot_postmoogle_relay_username }}
|
||||
POSTMOOGLE_RELAY_PASSWORD={{ matrix_bot_postmoogle_relay_password }}
|
||||
POSTMOOGLE_MONITORING_SENTRY_DSN={{ matrix_bot_postmoogle_monitoring_sentry_dsn }}
|
||||
POSTMOOGLE_MONITORING_SENTRY_RATE={{ matrix_bot_postmoogle_monitoring_sentry_rate }}
|
||||
POSTMOOGLE_MONITORING_HEALTHCHECKS_UUID={{ matrix_bot_postmoogle_monitoring_healthchecks_uuid }}
|
||||
POSTMOOGLE_MONITORING_HEALTHCHECKS_DURATION={{ matrix_bot_postmoogle_monitoring_healthchecks_duration }}
|
||||
POSTMOOGLE_MAILBOXES_FORWARDED={{ matrix_bot_postmoogle_mailboxes_forwarded | join(' ') }}
|
||||
POSTMOOGLE_MAILBOXES_RESERVED={{ matrix_bot_postmoogle_mailboxes_reserved | join(' ') }}
|
||||
POSTMOOGLE_MAILBOXES_ACTIVATION={{ matrix_bot_postmoogle_mailboxes_activation }}
|
||||
|
||||
{{ matrix_bot_postmoogle_environment_variables_extension }}
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# matrix-appservice-discord is a Matrix <-> Discord bridge
|
||||
# Project source code URL: https://github.com/Half-Shot/matrix-appservice-discord
|
||||
# Project source code URL: https://github.com/matrix-org/matrix-appservice-discord
|
||||
|
||||
matrix_appservice_discord_enabled: false
|
||||
matrix_appservice_discord_container_image_self_build: false
|
||||
|
||||
@@ -64,7 +64,7 @@ database:
|
||||
# You may either use SQLite or Postgresql for the bridge database, which contains
|
||||
# important mappings for events and user puppeting configurations.
|
||||
# Use the filename option for SQLite, or connString for Postgresql.
|
||||
# If you are migrating, see https://github.com/Half-Shot/matrix-appservice-discord/blob/master/docs/howto.md#migrate-to-postgres-from-sqlite
|
||||
# If you are migrating, see https://github.com/matrix-org/matrix-appservice-discord/blob/master/docs/howto.md#migrate-to-postgres-from-sqlite
|
||||
# WARNING: You will almost certainly be fine with sqlite unless your bridge
|
||||
# is in heavy demand and you suffer from IO slowness.
|
||||
{% if matrix_appservice_discord_database_engine == 'sqlite' %}
|
||||
|
||||
@@ -77,7 +77,7 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
|
||||
# # networkId: "example"
|
||||
|
||||
# # URL to an icon used as the network icon whenever this network appear in
|
||||
# # a network list. (Like in the riot room directory, for instance.)
|
||||
# # a network list. (Like in the Riot room directory, for instance.)
|
||||
# # icon: https://example.com/images/hash.png
|
||||
|
||||
# # The port to connect to. Optional.
|
||||
@@ -95,7 +95,7 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
|
||||
# # A specific CA to trust instead of the default CAs. Optional.
|
||||
# #ca: |
|
||||
# # -----BEGIN CERTIFICATE-----
|
||||
# # ...
|
||||
# # …
|
||||
# # -----END CERTIFICATE-----
|
||||
|
||||
# #
|
||||
|
||||
@@ -225,8 +225,8 @@ bridge:
|
||||
#
|
||||
# Available variables:
|
||||
# $sender_displayname - The display name of the sender (e.g. Example User)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. exampleuser)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @exampleuser:example.com)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. alice)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @alice:example.com)
|
||||
# $message - The message content
|
||||
message_formats:
|
||||
m.text: '<b>$sender_displayname</b>: $message'
|
||||
|
||||
@@ -60,7 +60,8 @@ matrix_beeper_linkedin_appservice_token: ""
|
||||
matrix_beeper_linkedin_homeserver_token: ""
|
||||
|
||||
matrix_beeper_linkedin_appservice_bot_username: linkedinbot
|
||||
|
||||
matrix_beeper_linkedin_appservice_bot_displayname: LinkedIn bridge bot
|
||||
matrix_beeper_linkedin_appservice_bot_avatar: mxc://nevarro.space/cwsWnmeMpWSMZLUNblJHaIvP
|
||||
|
||||
# Database-related configuration fields.
|
||||
# Only Postgres is supported.
|
||||
@@ -87,9 +88,24 @@ matrix_beeper_linkedin_appservice_database_uri: "{{
|
||||
}[matrix_beeper_linkedin_database_engine]
|
||||
}}"
|
||||
|
||||
matrix_beeper_linkedin_bridge_login_shared_secret_map: "{{ matrix_beeper_linkedin_bridge_login_shared_secret_map_auto | combine(matrix_beeper_linkedin_bridge_login_shared_secret_map_custom) }}"
|
||||
matrix_beeper_linkedin_bridge_login_shared_secret_map_auto: {}
|
||||
matrix_beeper_linkedin_bridge_login_shared_secret_map_custom: {}
|
||||
|
||||
# Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth) or Appservice Double Puppet.
|
||||
matrix_beeper_linkedin_login_shared_secret: ''
|
||||
# Servers to always allow double puppeting from
|
||||
matrix_beeper_linkedin_bridge_double_puppet_server_map: "{{ matrix_beeper_linkedin_bridge_double_puppet_server_map_default | combine(matrix_beeper_linkedin_bridge_double_puppet_server_map_auto) | combine(matrix_beeper_linkedin_bridge_double_puppet_server_map_custom) }}"
|
||||
matrix_beeper_linkedin_bridge_double_puppet_server_map_default: |-
|
||||
{{
|
||||
{}
|
||||
| combine({
|
||||
matrix_beeper_linkedin_homeserver_domain: matrix_beeper_linkedin_homeserver_address
|
||||
})
|
||||
}}
|
||||
matrix_beeper_linkedin_bridge_double_puppet_server_map_auto: {}
|
||||
matrix_beeper_linkedin_bridge_double_puppet_server_map_custom: {}
|
||||
|
||||
matrix_beeper_linkedin_provisioning_enabled: false
|
||||
matrix_beeper_linkedin_provisioning_shared_secret: ''
|
||||
|
||||
# Specifies the default log level for all bridge loggers.
|
||||
matrix_beeper_linkedin_logging_level: WARNING
|
||||
@@ -97,6 +113,8 @@ matrix_beeper_linkedin_logging_level: WARNING
|
||||
# Enable End-to-bridge encryption
|
||||
matrix_beeper_linkedin_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
|
||||
matrix_beeper_linkedin_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
|
||||
matrix_beeper_linkedin_bridge_encryption_appservice: "{{ matrix_beeper_linkedin_bridge_encryption_default }}"
|
||||
matrix_beeper_linkedin_bridge_encryption_require: false
|
||||
matrix_beeper_linkedin_bridge_encryption_key_sharing_allow: "{{ matrix_beeper_linkedin_bridge_encryption_allow }}"
|
||||
|
||||
# Default beeper-linkedin configuration template which covers the generic use case.
|
||||
|
||||
@@ -14,8 +14,23 @@
|
||||
- {path: "{{ matrix_beeper_linkedin_docker_src_files_path }}", when: "{{ matrix_beeper_linkedin_container_image_self_build }}"}
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure beeper-linkedin config.yaml installed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_beeper_linkedin_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_beeper_linkedin_config_path }}/config.yaml"
|
||||
mode: 0644
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure Beeper LinkedIn image is pulled
|
||||
- name: Ensure beeper-linkedin registration.yaml installed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_beeper_linkedin_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_beeper_linkedin_config_path }}/registration.yaml"
|
||||
mode: 0644
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure Beeper LinkedIn container image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_beeper_linkedin_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
@@ -41,7 +56,7 @@
|
||||
|
||||
# Building the container image (using the default Dockerfile) requires that a docker-requirements.txt file be generated.
|
||||
# See: https://github.com/beeper/linkedin/blob/94442db17ccb9769b377cdb8e4bf1cb3955781d7/.gitlab-ci.yml#L30-40
|
||||
- name: Ensure docker-requirements.txt is generated before building Beeper LinkedIn Docker Image
|
||||
- name: Ensure docker-requirements.txt is generated before building Beeper LinkedIn container image
|
||||
ansible.builtin.command:
|
||||
cmd: |
|
||||
{{ devture_systemd_docker_base_host_command_docker }} run
|
||||
@@ -54,7 +69,7 @@
|
||||
register: matrix_beeper_linkedin_generate_docker_requirements_result
|
||||
changed_when: matrix_beeper_linkedin_generate_docker_requirements_result.rc == 0
|
||||
|
||||
- name: Ensure Beeper LinkedIn Docker image is built
|
||||
- name: Ensure Beeper LinkedIn container image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_beeper_linkedin_docker_image }}"
|
||||
source: build
|
||||
@@ -67,22 +82,6 @@
|
||||
args:
|
||||
TARGETARCH: "{{ matrix_architecture }}"
|
||||
|
||||
- name: Ensure beeper-linkedin config.yaml installed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_beeper_linkedin_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_beeper_linkedin_config_path }}/config.yaml"
|
||||
mode: 0644
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure beeper-linkedin registration.yaml installed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_beeper_linkedin_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_beeper_linkedin_config_path }}/registration.yaml"
|
||||
mode: 0644
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure beeper-linkedin container network is created
|
||||
community.general.docker_network:
|
||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||
|
||||
@@ -11,3 +11,12 @@
|
||||
- {'name': 'matrix_beeper_linkedin_homeserver_token', when: true}
|
||||
- {'name': 'matrix_beeper_linkedin_database_hostname', when: "{{ matrix_beeper_linkedin_database_engine == 'postgres' }}"}
|
||||
- {'name': 'matrix_beeper_linkedin_container_network', when: true}
|
||||
|
||||
- name: (Deprecation) Catch and report renamed beeper-linkedin settings
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Your configuration contains a variable, which now has a different name.
|
||||
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
|
||||
when: "item.old in vars"
|
||||
with_items:
|
||||
- {'old': 'matrix_beeper_linkedin_login_shared_secret', 'new': '<superseded by matrix_beeper_linkedin_bridge_login_shared_secret_map_*>'}
|
||||
|
||||
@@ -1,62 +1,74 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
# Homeserver details.
|
||||
# Homeserver details
|
||||
homeserver:
|
||||
# The address that this appservice can use to connect to the homeserver.
|
||||
address: {{ matrix_beeper_linkedin_homeserver_address }}
|
||||
address: {{ matrix_beeper_linkedin_homeserver_address | to_json }}
|
||||
# The domain of the homeserver (for MXIDs, etc).
|
||||
domain: {{ matrix_beeper_linkedin_homeserver_domain }}
|
||||
domain: {{ matrix_beeper_linkedin_homeserver_domain | to_json }}
|
||||
# Whether or not to verify the SSL certificate of the homeserver.
|
||||
# Only applies if address starts with https://
|
||||
verify_ssl: true
|
||||
# Whether or not the homeserver supports asmux-specific endpoints,
|
||||
# such as /_matrix/client/unstable/net.maunium.asmux/dms for atomically
|
||||
# updating m.direct.
|
||||
asmux: false
|
||||
# What software is the homeserver running?
|
||||
# Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
|
||||
software: standard
|
||||
# Number of retries for all HTTP requests if the homeserver isn't reachable.
|
||||
http_retry_count: 4
|
||||
# The URL to push real-time bridge status to.
|
||||
# If set, the bridge will make POST requests to this URL whenever a user's Signal connection state changes.
|
||||
# The bridge will use the appservice as_token to authorize requests.
|
||||
status_endpoint: null
|
||||
# Endpoint for reporting per-message status.
|
||||
message_send_checkpoint_endpoint: null
|
||||
# Whether asynchronous uploads via MSC2246 should be enabled for media.
|
||||
# Requires a media repo that supports MSC2246.
|
||||
async_media: false
|
||||
|
||||
|
||||
# Application service host/registration related details
|
||||
# Changing these values requires regeneration of the registration.
|
||||
appservice:
|
||||
# The address that the homeserver can use to connect to this appservice.
|
||||
address: {{ matrix_beeper_linkedin_appservice_address }}
|
||||
address: {{ matrix_beeper_linkedin_appservice_address | to_json }}
|
||||
|
||||
# The hostname and port where this appservice should listen.
|
||||
hostname: 0.0.0.0
|
||||
port: 29319
|
||||
|
||||
# The maximum body size of appservice API requests (from the homeserver) in mebibytes
|
||||
# Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
|
||||
max_body_size: 1
|
||||
|
||||
# The full URI to the database. Only Postgres is currently supported.
|
||||
database: {{ matrix_beeper_linkedin_appservice_database_uri|to_json }}
|
||||
# Additional arguments for asyncpg.create_pool()
|
||||
# The full URI to the database. SQLite and Postgres are supported.
|
||||
# Format examples:
|
||||
# SQLite: sqlite:filename.db
|
||||
# Postgres: postgres://username:password@hostname/dbname
|
||||
database: {{ matrix_beeper_linkedin_appservice_database_uri | to_json }}
|
||||
# Additional arguments for asyncpg.create_pool() or sqlite3.connect()
|
||||
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
||||
# https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
|
||||
# For sqlite, min_size is used as the connection thread pool size and max_size is ignored.
|
||||
# Additionally, SQLite supports init_commands as an array of SQL queries to run on connect (e.g. to set PRAGMAs).
|
||||
database_opts:
|
||||
min_size: 5
|
||||
min_size: 1
|
||||
max_size: 10
|
||||
|
||||
# Provisioning API part of the web server for automated portal creation and fetching information.
|
||||
# Used by things like mautrix-manager (https://github.com/tulir/mautrix-manager).
|
||||
provisioning:
|
||||
# Whether or not the provisioning API should be enabled.
|
||||
enabled: true
|
||||
enabled: {{ matrix_beeper_linkedin_provisioning_enabled | to_json }}
|
||||
# The prefix to use in the provisioning API endpoints.
|
||||
prefix: /_matrix/provision/v1
|
||||
# The shared secret to authorize users of the API.
|
||||
# Set to "generate" to generate and save a new token.
|
||||
shared_secret: generate
|
||||
shared_secret: {{ matrix_beeper_linkedin_provisioning_shared_secret | to_json }}
|
||||
|
||||
# The unique ID of this appservice.
|
||||
id: beeper_linkedin
|
||||
# Appservice bot details.
|
||||
bot:
|
||||
# Username of the appservice bot.
|
||||
username: {{ matrix_beeper_linkedin_appservice_bot_username|to_json }}
|
||||
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
|
||||
# to leave display name/avatar as-is.
|
||||
displayname: LinkedIn bridge bot
|
||||
avatar: mxc://sumnerevans.com/XMtwdeUBnxYvWNFFrfeTSHqB
|
||||
# Username of the appservice bot.
|
||||
bot_username: {{ matrix_beeper_linkedin_appservice_bot_username | to_json }}
|
||||
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
|
||||
# to leave display name/avatar as-is.
|
||||
bot_displayname: {{ matrix_beeper_linkedin_appservice_bot_displayname | to_json }}
|
||||
bot_avatar: {{ matrix_beeper_linkedin_appservice_bot_avatar | to_json }}
|
||||
|
||||
# Whether or not to receive ephemeral events via appservice transactions.
|
||||
# Requires MSC2409 support (i.e. Synapse 1.22+).
|
||||
@@ -64,9 +76,17 @@ appservice:
|
||||
ephemeral_events: false
|
||||
|
||||
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
|
||||
as_token: "{{ matrix_beeper_linkedin_appservice_token }}"
|
||||
hs_token: "{{ matrix_beeper_linkedin_homeserver_token }}"
|
||||
as_token: {{ matrix_beeper_linkedin_appservice_token | to_json }}
|
||||
hs_token: {{ matrix_beeper_linkedin_homeserver_token | to_json }}
|
||||
|
||||
# Segment-compatible analytics endpoint for tracking some events, like provisioning API login and encryption errors.
|
||||
analytics:
|
||||
# Hostname of the tracking server. The path is hardcoded to /v1/track
|
||||
host: api.segment.io
|
||||
# API key to send with tracking requests. Tracking is disabled if this is null.
|
||||
token: null
|
||||
# Optional user ID for tracking events. If null, defaults to using Matrix user ID.
|
||||
user_id: null
|
||||
|
||||
# Prometheus telemetry config. Requires prometheus-client to be installed.
|
||||
metrics:
|
||||
@@ -84,30 +104,41 @@ manhole:
|
||||
whitelist:
|
||||
- 0
|
||||
|
||||
|
||||
# Bridge config
|
||||
bridge:
|
||||
# Localpart template of MXIDs for LinkedIn users.
|
||||
# {userid} is replaced with the user ID of the LinkedIn user
|
||||
# {userid} is replaced with the user ID of the LinkedIn user.
|
||||
username_template: "linkedin_{userid}"
|
||||
# Settings for creating a space for every user.
|
||||
space_support:
|
||||
# Whether or not to enable creating a space per user and inviting the
|
||||
# user (as well as all of the puppets) to that space.
|
||||
enable: {{ matrix_beeper_linkedin_bridge_space_support_enable|to_json }}
|
||||
enable: {{ matrix_beeper_linkedin_bridge_space_support_enable | to_json }}
|
||||
# The name of the space
|
||||
name: "LinkedIn"
|
||||
|
||||
# Displayname template for LinkedIn users.
|
||||
# {displayname} is replaced with the display name of the LinkedIn user
|
||||
# as defined below in displayname_preference.
|
||||
# Keys available for displayname_preference are also available here.
|
||||
displayname_template: "{displayname} (LinkedIn)"
|
||||
# Available keys:
|
||||
# "name" (full name)
|
||||
# "first_name"
|
||||
# "last_name"
|
||||
displayname_preference:
|
||||
- name
|
||||
- first_name
|
||||
|
||||
# Whether or not to set the topic on DMs to the user's occupation and a
|
||||
# link to their profile.
|
||||
set_topic_on_dms: true
|
||||
|
||||
# The prefix for commands. Only required in non-management rooms.
|
||||
command_prefix: {{ matrix_beeper_linkedin_command_prefix | to_json }}
|
||||
|
||||
# Number of chats to sync (and create portals for) on startup/login.
|
||||
# Set 0 to disable automatic syncing.
|
||||
initial_chat_sync: 10
|
||||
|
||||
initial_chat_sync: 20
|
||||
# Whether or not the LinkedIn users of logged in Matrix users should be
|
||||
# invited to private chats when the user sends a message from another client.
|
||||
invite_own_puppet_to_pm: false
|
||||
@@ -119,65 +150,112 @@ bridge:
|
||||
# and is therefore prone to race conditions.
|
||||
sync_direct_chat_list: false
|
||||
# Servers to always allow double puppeting from
|
||||
double_puppet_server_map: {}
|
||||
# example.com: https://example.com
|
||||
double_puppet_server_map: {{ matrix_beeper_linkedin_bridge_double_puppet_server_map | to_json }}
|
||||
# Allow using double puppeting from any server with a valid client .well-known file.
|
||||
|
||||
# Maximum number of seconds since last message in chat to skip
|
||||
# syncing the chat in any case. This setting will take priority
|
||||
# over both recovery_chat_sync_limit and initial_chat_sync_count.
|
||||
# Default is 3 days = 259200 seconds
|
||||
sync_max_chat_age: 259200
|
||||
|
||||
# Whether or not to sync with custom puppets to receive EDUs that
|
||||
# are not normally sent to appservices.
|
||||
sync_with_custom_puppets: true
|
||||
# Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
|
||||
double_puppet_allow_discovery: false
|
||||
# Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
|
||||
#
|
||||
# If set, custom puppets will be enabled automatically for local users
|
||||
# instead of users having to find an access token and run `login-matrix`
|
||||
# manually.
|
||||
login_shared_secret: {{ matrix_beeper_linkedin_login_shared_secret|to_json }}
|
||||
|
||||
# Allow using double puppeting from any server with a valid client .well-known file.
|
||||
double_puppet_allow_discovery: false
|
||||
|
||||
# If using this for other servers than the bridge's server,
|
||||
# you must also set the URL in the double_puppet_server_map.
|
||||
login_shared_secret_map: {{ matrix_beeper_linkedin_bridge_login_shared_secret_map | to_json }}
|
||||
# Whether or not to bridge presence in both directions. LinkedIn allows users not to broadcast
|
||||
# presence, but then it won't send other users' presence to the client.
|
||||
presence: {{ matrix_beeper_linkedin_bridge_presence|to_json }}
|
||||
presence: {{ matrix_beeper_linkedin_bridge_presence | to_json }}
|
||||
# Whether or not to update avatars when syncing all contacts at startup.
|
||||
update_avatar_initial_sync: true
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
# If false, created portal rooms will never be federated.
|
||||
federate_rooms: true
|
||||
# Whether to explicitly set the avatar and room name for private chat portal rooms.
|
||||
# If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
|
||||
# If set to `always`, all DM rooms will have explicit names and avatars set.
|
||||
# If set to `never`, DM rooms will never have names and avatars set.
|
||||
private_chat_portal_meta: default
|
||||
|
||||
|
||||
# End-to-bridge encryption support options. These require matrix-nio to be installed with pip
|
||||
# and login_shared_secret to be configured in order to get a device for the bridge bot.
|
||||
# End-to-bridge encryption support options.
|
||||
#
|
||||
# Additionally, https://github.com/matrix-org/synapse/pull/5758 is required if using a normal
|
||||
# application service.
|
||||
# See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
|
||||
encryption:
|
||||
# Allow encryption, work in group chat rooms with e2ee enabled
|
||||
allow: {{ matrix_beeper_linkedin_bridge_encryption_allow|to_json }}
|
||||
allow: {{ matrix_beeper_linkedin_bridge_encryption_allow | to_json }}
|
||||
# Default to encryption, force-enable encryption in all portals the bridge creates
|
||||
# This will cause the bridge bot to be in private chats for the encryption to work properly.
|
||||
default: {{ matrix_beeper_linkedin_bridge_encryption_default|to_json }}
|
||||
# Options for automatic key sharing.
|
||||
key_sharing:
|
||||
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
|
||||
# You must use a client that supports requesting keys from other users to use this feature.
|
||||
allow: {{ matrix_beeper_linkedin_bridge_encryption_key_sharing_allow|to_json }}
|
||||
# Require the requesting device to have a valid cross-signing signature?
|
||||
# This doesn't require that the bridge has verified the device, only that the user has verified it.
|
||||
# Not yet implemented.
|
||||
require_cross_signing: false
|
||||
# Require devices to be verified by the bridge?
|
||||
# Verification by the bridge is not yet implemented.
|
||||
require_verification: true
|
||||
default: {{ matrix_beeper_linkedin_bridge_encryption_default | to_json }}
|
||||
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
|
||||
appservice: {{ matrix_beeper_linkedin_bridge_encryption_appservice | to_json }}
|
||||
# Require encryption, drop any unencrypted messages.
|
||||
require: {{ matrix_beeper_linkedin_bridge_encryption_require | to_json }}
|
||||
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
|
||||
# You must use a client that supports requesting keys from other users to use this feature.
|
||||
allow_key_sharing: {{ matrix_beeper_linkedin_bridge_encryption_key_sharing_allow | to_json }}
|
||||
# Options for deleting megolm sessions from the bridge.
|
||||
delete_keys:
|
||||
# Beeper-specific: delete outbound sessions when hungryserv confirms
|
||||
# that the user has uploaded the key to key backup.
|
||||
delete_outbound_on_ack: false
|
||||
# Don't store outbound sessions in the inbound table.
|
||||
dont_store_outbound: false
|
||||
# Ratchet megolm sessions forward after decrypting messages.
|
||||
ratchet_on_decrypt: false
|
||||
# Delete fully used keys (index >= max_messages) after decrypting messages.
|
||||
delete_fully_used_on_decrypt: false
|
||||
# Delete previous megolm sessions from same device when receiving a new one.
|
||||
delete_prev_on_new_session: false
|
||||
# Delete megolm sessions received from a device when the device is deleted.
|
||||
delete_on_device_delete: false
|
||||
# Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
|
||||
periodically_delete_expired: false
|
||||
# Delete inbound megolm sessions that don't have the received_at field used for
|
||||
# automatic ratcheting and expired session deletion. This is meant as a migration
|
||||
# to delete old keys prior to the bridge update.
|
||||
delete_outdated_inbound: false
|
||||
# What level of device verification should be required from users?
|
||||
#
|
||||
# Valid levels:
|
||||
# unverified - Send keys to all device in the room.
|
||||
# cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
|
||||
# cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
|
||||
# cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
|
||||
# Note that creating user signatures from the bridge bot is not currently possible.
|
||||
# verified - Require manual per-device verification
|
||||
# (currently only possible by modifying the `trust` column in the `crypto_device` database table).
|
||||
verification_levels:
|
||||
# Minimum level for which the bridge should send keys to when bridging messages from Telegram to Matrix.
|
||||
receive: unverified
|
||||
# Minimum level that the bridge should accept for incoming Matrix messages.
|
||||
send: unverified
|
||||
# Minimum level that the bridge should require for accepting key requests.
|
||||
share: cross-signed-tofu
|
||||
# Options for Megolm room key rotation. These options allow you to
|
||||
# configure the m.room.encryption event content. See:
|
||||
# https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
|
||||
# more information about that event.
|
||||
rotation:
|
||||
# Enable custom Megolm room key rotation settings. Note that these
|
||||
# settings will only apply to rooms created after this option is
|
||||
# set.
|
||||
enable_custom: false
|
||||
# The maximum number of milliseconds a session should be used
|
||||
# before changing it. The Matrix spec recommends 604800000 (a week)
|
||||
# as the default.
|
||||
milliseconds: 604800000
|
||||
# The maximum number of messages that should be sent with a given a
|
||||
# session before changing it. The Matrix spec recommends 100 as the
|
||||
# default.
|
||||
messages: 100
|
||||
|
||||
# Disable rotating keys when a user's devices change?
|
||||
# You should not enable this option unless you understand all the implications.
|
||||
disable_device_change_key_rotation: false
|
||||
|
||||
# Whether or not the bridge should send a read receipt from the bridge bot when a message has
|
||||
# been sent to LinkedIn.
|
||||
delivery_receipts: false
|
||||
# Whether to allow inviting arbitrary mxids to portal rooms
|
||||
allow_invites: false
|
||||
|
||||
# Settings for backfilling messages from LinkedIn.
|
||||
backfill:
|
||||
# Whether or not the LinkedIn users of logged in Matrix users should be
|
||||
@@ -194,6 +272,10 @@ bridge:
|
||||
# If using double puppeting, should notifications be disabled
|
||||
# while the initial backfill is in progress?
|
||||
disable_notifications: false
|
||||
# If this value is greater than 0, then (on backfill) if the
|
||||
# conversation's last message was more than this number of hours ago,
|
||||
# then the conversation will automatically be marked it as read.
|
||||
unread_hours_threshold: 0
|
||||
periodic_reconnect:
|
||||
# TODO needed?
|
||||
# Interval in seconds in which to automatically reconnect all users.
|
||||
@@ -224,23 +306,20 @@ bridge:
|
||||
# Whether or not mute status and tags should only be bridged when the portal room is created.
|
||||
tag_only_on_create: true
|
||||
|
||||
|
||||
# The prefix for commands. Only required in non-management rooms.
|
||||
command_prefix: "{{ matrix_beeper_linkedin_command_prefix }}"
|
||||
|
||||
# Permissions for using the bridge.
|
||||
# Permitted values:
|
||||
# user - Access to use the bridge to chat with a Linkedin account.
|
||||
# admin - User level and some additional administration tools
|
||||
# user - Use the bridge with puppeting.
|
||||
# admin - Use and administrate the bridge.
|
||||
# Permitted keys:
|
||||
# * - All Matrix users
|
||||
# domain - All users on that homeserver
|
||||
# mxid - Specific user
|
||||
permissions: {{ matrix_beeper_linkedin_bridge_permissions|to_json }}
|
||||
permissions: {{ matrix_beeper_linkedin_bridge_permissions | to_json }}
|
||||
|
||||
|
||||
|
||||
# Logging config.
|
||||
# Python logging configuration.
|
||||
#
|
||||
# See section 16.7.2 of the Python documentation for more info:
|
||||
# https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
|
||||
logging:
|
||||
version: 1
|
||||
formatters:
|
||||
@@ -256,10 +335,8 @@ logging:
|
||||
loggers:
|
||||
mau:
|
||||
level: {{ matrix_beeper_linkedin_logging_level|to_json }}
|
||||
paho:
|
||||
level: {{ matrix_beeper_linkedin_logging_level|to_json }}
|
||||
aiohttp:
|
||||
level: {{ matrix_beeper_linkedin_logging_level|to_json }}
|
||||
root:
|
||||
level: {{ matrix_beeper_linkedin_logging_level|to_json }}
|
||||
level: DEBUG
|
||||
handlers: [console]
|
||||
|
||||
@@ -23,13 +23,13 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--network={{ matrix_beeper_linkedin_container_network }} \
|
||||
--mount type=bind,src={{ matrix_beeper_linkedin_config_path }},dst=/data \
|
||||
--mount type=bind,src={{ matrix_beeper_linkedin_config_path }},dst=/config,ro \
|
||||
--workdir=/opt/linkedin-matrix \
|
||||
{% for arg in matrix_beeper_linkedin_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_beeper_linkedin_docker_image }} \
|
||||
python3 -m linkedin_matrix -c /data/config.yaml -r /data/registration.yaml
|
||||
python3 -m linkedin_matrix -c /config/config.yaml -r /config/registration.yaml --no-update
|
||||
|
||||
{% for network in matrix_beeper_linkedin_container_additional_networks %}
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-beeper-linkedin
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
# heisenbridge is a bouncer-style Matrix IRC bridge
|
||||
# Heisenbridge is a bouncer-style Matrix IRC bridge
|
||||
# Project source code URL: https://github.com/hifi/heisenbridge
|
||||
|
||||
matrix_heisenbridge_enabled: true
|
||||
@@ -93,7 +93,7 @@ matrix_heisenbridge_registration_yaml_heisenbridge:
|
||||
displayname: "{{ matrix_heisenbridge_config_displayname }}"
|
||||
|
||||
# Default registration file consumed by both the homeserver and Heisenbridge.
|
||||
# Besides registration information, it contains configuration (see the heisenbridge key).
|
||||
# Besides registration information, it contains configuration (see the Heisenbridge key).
|
||||
matrix_heisenbridge_registration_yaml:
|
||||
id: heisenbridge
|
||||
url: http://matrix-heisenbridge:9898
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
|
||||
- name: Ensure heisenbridge image is pulled
|
||||
- name: Ensure Heisenbridge image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_heisenbridge_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
@@ -11,7 +11,7 @@
|
||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure heisenbridge paths exist
|
||||
- name: Ensure Heisenbridge paths exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
@@ -21,7 +21,7 @@
|
||||
with_items:
|
||||
- "{{ matrix_heisenbridge_base_path }}"
|
||||
|
||||
- name: Ensure heisenbridge registration.yaml installed if provided
|
||||
- name: Ensure Heisenbridge registration.yaml installed if provided
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_heisenbridge_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_heisenbridge_base_path }}/registration.yaml"
|
||||
@@ -29,7 +29,7 @@
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure heisenbridge support files installed
|
||||
- name: Ensure Heisenbridge support files installed
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||
dest: "{{ matrix_heisenbridge_base_path }}/{{ item }}"
|
||||
@@ -39,7 +39,7 @@
|
||||
with_items:
|
||||
- labels
|
||||
|
||||
- name: Ensure heisenbridge container network is created
|
||||
- name: Ensure Heisenbridge container network is created
|
||||
community.general.docker_network:
|
||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||
name: "{{ matrix_heisenbridge_container_network }}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
|
||||
- name: Fail if required heisenbridge settings not defined
|
||||
- name: Fail if required Heisenbridge settings not defined
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item.name }}`).
|
||||
|
||||
@@ -17,10 +17,10 @@ matrix_hookshot_container_additional_networks_auto: []
|
||||
matrix_hookshot_container_additional_networks_custom: []
|
||||
|
||||
# renovate: datasource=docker depName=halfshot/matrix-hookshot
|
||||
matrix_hookshot_version: 5.4.1
|
||||
matrix_hookshot_version: 6.0.1
|
||||
|
||||
matrix_hookshot_docker_image: "{{ matrix_hookshot_docker_image_name_prefix }}halfshot/matrix-hookshot:{{ matrix_hookshot_version }}"
|
||||
matrix_hookshot_docker_image_name_prefix: "{{ 'localhost/' if matrix_hookshot_container_image_self_build else matrix_container_global_registry_prefix }}"
|
||||
matrix_hookshot_docker_image: "{{ matrix_hookshot_docker_image_name_prefix }}matrix-org/matrix-hookshot:{{ matrix_hookshot_version }}"
|
||||
matrix_hookshot_docker_image_name_prefix: "{{ 'localhost/' if matrix_hookshot_container_image_self_build else 'ghcr.io/' }}"
|
||||
matrix_hookshot_docker_image_force_pull: "{{ matrix_hookshot_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_hookshot_base_path: "{{ matrix_base_data_path }}/hookshot"
|
||||
@@ -30,6 +30,9 @@ matrix_hookshot_docker_src_files_path: "{{ matrix_hookshot_base_path }}/docker-s
|
||||
matrix_hookshot_homeserver_address: ""
|
||||
matrix_hookshot_container_url: 'matrix-hookshot'
|
||||
|
||||
# Sets the localpart of the Matrix ID for the hookshot bot
|
||||
matrix_hookshot_bot_localpart: "hookshot"
|
||||
|
||||
matrix_hookshot_public_scheme: https
|
||||
matrix_hookshot_public_hostname: "{{ matrix_server_fqn_matrix }}"
|
||||
matrix_hookshot_public_endpoint: /hookshot
|
||||
@@ -46,17 +49,18 @@ matrix_hookshot_appservice_hostname: "{{ matrix_hookshot_public_hostname }}"
|
||||
matrix_hookshot_appservice_endpoint: "{{ matrix_hookshot_public_endpoint }}/_matrix/app"
|
||||
|
||||
# The variables below control the Redis cache parameters.
|
||||
# Using caching is required when experimental encryption is enabled (`matrix_hookshot_experimental_encryption_enabled`)
|
||||
# Using caching is required when encryption is enabled (`matrix_hookshot_encryption_enabled`)
|
||||
# but may also speed up Hookshot startup, etc.
|
||||
matrix_hookshot_cache_redis_host: ''
|
||||
matrix_hookshot_cache_redis_port: "6379"
|
||||
matrix_hookshot_cache_redisUri: "{{ ('redis://' + matrix_hookshot_cache_redis_host + ':' + matrix_hookshot_cache_redis_port) if matrix_hookshot_cache_redis_host else '' }}" # noqa var-naming
|
||||
|
||||
# Controls whether the experimental end-to-bridge encryption support is enabled.
|
||||
# Controls whether the end-to-bridge encryption support is enabled.
|
||||
# This requires that:
|
||||
# - support to also be enabled in the homeserver, see the documentation of Hookshot.
|
||||
# - Hookshot to be pointed at a Redis instance via the `matrix_hookshot_cache_redis*` variables.
|
||||
matrix_hookshot_experimental_encryption_enabled: false
|
||||
# See: https://matrix-org.github.io/matrix-hookshot/latest/advanced/encryption.html
|
||||
matrix_hookshot_encryption_enabled: false
|
||||
|
||||
# Controls whether metrics are enabled in the bridge configuration.
|
||||
# Enabling them is usually enough for a local (in-container) Prometheus to consume them.
|
||||
@@ -86,7 +90,7 @@ matrix_hookshot_github_auth_id: ''
|
||||
# Set this variable to the contents of the generated and downloaded GitHub private key:
|
||||
# matrix_hookshot_github_private_key: |
|
||||
# -----BEGIN RSA PRIVATE KEY-----
|
||||
# 0123456789ABCDEF...
|
||||
# 0123456789ABCDEF…
|
||||
# -----END RSA PRIVATE KEY-----
|
||||
# Alternatively, leave it empty and do it manually or use matrix-aux instead, see docs/matrix-bridge-hookshot.md for info.
|
||||
matrix_hookshot_github_private_key: ''
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
---
|
||||
|
||||
- name: Ensure matrix-hookshot is stopped
|
||||
ansible.builtin.service:
|
||||
name: matrix-hookshot
|
||||
state: stopped
|
||||
register: matrix_hookshot_stopped
|
||||
|
||||
# `yarn start:resetcrypto` fails, as described here: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3868
|
||||
# Also related to: https://github.com/matrix-org/matrix-hookshot/issues/730
|
||||
- name: Resetting Hookshot's crypto store
|
||||
ansible.builtin.command:
|
||||
cmd: |
|
||||
@@ -8,7 +16,15 @@
|
||||
--name={{ matrix_hookshot_identifier }}-reset-crypto
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
||||
--cap-drop=ALL
|
||||
--mount type=bind,src={{ matrix_hookshot_base_path }}/config.yml,dst=/config.yml
|
||||
--mount type=bind,src={{ matrix_hookshot_base_path }},dst=/data
|
||||
{{ matrix_hookshot_docker_image }}
|
||||
yarn start:resetcrypto
|
||||
node --require source-map-support/register /usr/bin/matrix-hookshot/App/ResetCryptoStore.js
|
||||
changed_when: true
|
||||
|
||||
- name: Ensure matrix-hookshot is started, if it previously was
|
||||
ansible.builtin.service:
|
||||
name: matrix-hookshot
|
||||
state: started
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
when: matrix_hookshot_stopped.changed | bool
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
- {'old': 'matrix_hookshot_ident', 'new': 'matrix_hookshot_identifier'}
|
||||
- {'old': 'matrix_hookshot_queue_host', 'new': 'matrix_hookshot_cache_redis_host'}
|
||||
- {'old': 'matrix_hookshot_queue_port', 'new': 'matrix_hookshot_cache_redis_port'}
|
||||
- {'old': 'matrix_hookshot_experimental_encryption_enabled', 'new': 'matrix_hookshot_encryption_enabled'}
|
||||
|
||||
- name: Fail if required Hookshot settings not defined
|
||||
ansible.builtin.fail:
|
||||
@@ -96,7 +97,7 @@
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`matrix_hookshot_cache_redis*`) to enable Hookshot encryption.
|
||||
when: "matrix_hookshot_experimental_encryption_enabled and matrix_hookshot_cache_redisUri == ''"
|
||||
when: "matrix_hookshot_encryption_enabled and matrix_hookshot_cache_redisUri == ''"
|
||||
|
||||
- name: (Deprecation) Catch and report old metrics usage
|
||||
ansible.builtin.fail:
|
||||
|
||||
@@ -113,8 +113,8 @@ metrics:
|
||||
cache:
|
||||
redisUri: {{ matrix_hookshot_cache_redisUri | to_json }}
|
||||
{% endif %}
|
||||
{% if matrix_hookshot_experimental_encryption_enabled %}
|
||||
experimentalEncryption:
|
||||
{% if matrix_hookshot_encryption_enabled %}
|
||||
encryption:
|
||||
storagePath: /data/encryption
|
||||
{% endif %}
|
||||
logging:
|
||||
|
||||
@@ -25,11 +25,11 @@ namespaces:
|
||||
- regex: "#github_.+:{{ matrix_domain }}"
|
||||
exclusive: true
|
||||
|
||||
sender_localpart: hookshot
|
||||
sender_localpart: {{ matrix_hookshot_bot_localpart | to_json }}
|
||||
url: "http://{{ matrix_hookshot_container_url }}:{{ matrix_hookshot_appservice_port }}" # This should match the bridge.port in your config file
|
||||
rate_limited: false
|
||||
|
||||
{% if matrix_hookshot_experimental_encryption_enabled %}
|
||||
{% if matrix_hookshot_encryption_enabled %}
|
||||
de.sorunome.msc2409.push_ephemeral: true
|
||||
push_ephemeral: true
|
||||
org.matrix.msc3202: true
|
||||
|
||||
@@ -4,12 +4,16 @@
|
||||
|
||||
matrix_mautrix_discord_enabled: true
|
||||
|
||||
matrix_mautrix_discord_hostname: ""
|
||||
matrix_mautrix_discord_path_prefix: /
|
||||
matrix_mautrix_discord_scheme: https
|
||||
|
||||
matrix_mautrix_discord_container_image_self_build: false
|
||||
matrix_mautrix_discord_container_image_self_build_repo: "https://mau.dev/mautrix/discord.git"
|
||||
matrix_mautrix_discord_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_discord_version == 'latest' else matrix_mautrix_discord_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/discord
|
||||
matrix_mautrix_discord_version: v0.7.0
|
||||
matrix_mautrix_discord_version: v0.7.2
|
||||
|
||||
# See: https://mau.dev/mautrix/discord/container_registry
|
||||
matrix_mautrix_discord_docker_image: "{{ matrix_mautrix_discord_docker_image_name_prefix }}mautrix/discord:{{ matrix_mautrix_discord_version }}"
|
||||
@@ -22,11 +26,31 @@ matrix_mautrix_discord_data_path: "{{ matrix_mautrix_discord_base_path }}/data"
|
||||
matrix_mautrix_discord_docker_src_files_path: "{{ matrix_mautrix_discord_base_path }}/docker-src"
|
||||
|
||||
matrix_mautrix_discord_homeserver_address: ""
|
||||
matrix_mautrix_discord_homeserver_public_address: ''
|
||||
matrix_mautrix_discord_homeserver_domain: "{{ matrix_domain }}"
|
||||
matrix_mautrix_discord_appservice_address: "http://matrix-mautrix-discord:8080"
|
||||
|
||||
matrix_mautrix_discord_command_prefix: "!discord"
|
||||
matrix_mautrix_discord_bridge_command_prefix: "!discord"
|
||||
|
||||
# Publicly accessible base URL that Discord can use to reach the bridge, used for avatars in relay mode.
|
||||
# If not set, avatars will not be bridged. Only the /mautrix-discord/avatar/{server}/{id}/{hash} endpoint is used on this address.
|
||||
# This should not have a trailing slash, the endpoint above will be appended to the provided address.
|
||||
matrix_mautrix_discord_bridge_public_address: "{{ (matrix_mautrix_discord_scheme + '://' + matrix_mautrix_discord_hostname + (matrix_mautrix_discord_path_prefix if matrix_mautrix_discord_path_prefix != '/' else '')) if matrix_mautrix_discord_hostname else '' }}"
|
||||
|
||||
# A random key used to sign the avatar URLs. The bridge will only accept requests with a valid signature.
|
||||
matrix_mautrix_discord_bridge_avatar_proxy_key: ''
|
||||
|
||||
# Localpart template of MXIDs for Discord users.
|
||||
# {{ '{{.}}' }} is replaced with the internal ID of the Discord user.
|
||||
matrix_mautrix_discord_bridge_username_template: "{% raw %}discord_{{.}}{% endraw %}"
|
||||
|
||||
# Displayname template for Discord users. This is also used as the room name in DMs if private_chat_portal_meta is enabled.
|
||||
matrix_mautrix_discord_bridge_displayname_template: "{% raw %}{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}{% endraw %}"
|
||||
|
||||
# Displayname template for Discord channels (bridged as rooms, or spaces when type=4).
|
||||
matrix_mautrix_discord_bridge_channel_name_template: "{% raw %}{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}}{{else}}#{{.Name}}{{end}}{% endraw %}"
|
||||
|
||||
# Displayname template for Discord guilds (bridged as spaces).
|
||||
matrix_mautrix_discord_bridge_guild_name_template: "{% raw %}{{.Name}}{% endraw %}"
|
||||
|
||||
matrix_mautrix_discord_bridge_permissions: |
|
||||
{{
|
||||
@@ -40,6 +64,38 @@ matrix_mautrix_discord_container_additional_networks: "{{ matrix_mautrix_discord
|
||||
matrix_mautrix_discord_container_additional_networks_auto: []
|
||||
matrix_mautrix_discord_container_additional_networks_custom: []
|
||||
|
||||
# matrix_mautrix_discord_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_mautrix_discord_container_labels_additional_labels`.
|
||||
matrix_mautrix_discord_container_labels_traefik_enabled: true
|
||||
matrix_mautrix_discord_container_labels_traefik_docker_network: "{{ matrix_mautrix_discord_container_network }}"
|
||||
matrix_mautrix_discord_container_labels_traefik_hostname: "{{ matrix_mautrix_discord_hostname }}"
|
||||
# The path prefix must either be `/` or not end with a slash (e.g. `/matrix-alertmanager-receiver`).
|
||||
matrix_mautrix_discord_container_labels_traefik_path_prefix: "{{ matrix_mautrix_discord_path_prefix }}"
|
||||
matrix_mautrix_discord_container_labels_traefik_entrypoints: web-secure
|
||||
matrix_mautrix_discord_container_labels_traefik_tls_certResolver: default # noqa var-naming
|
||||
|
||||
# Controls whether labels will be added that expose the bridge's avatar proxy (`/mautrix-discord/avatar/{server}/{id}/{hash}`).
|
||||
# See: matrix_mautrix_discord_bridge_public_address
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_enabled: "{{ matrix_mautrix_discord_bridge_public_address != '' }}"
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_hostname: "{{ matrix_mautrix_discord_container_labels_traefik_hostname }}"
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_path_prefix: "{{ matrix_mautrix_discord_container_labels_traefik_path_prefix if matrix_mautrix_discord_container_labels_traefik_path_prefix == '/' else (matrix_mautrix_discord_container_labels_traefik_path_prefix + '/') }}mautrix-discord/avatar"
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_traefik_rule: "Host(`{{ matrix_mautrix_discord_container_labels_traefik_hostname }}`) && PathPrefix(`{{ matrix_mautrix_discord_container_labels_avatar_proxy_path_prefix }}`)"
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority: 0
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_traefik_entrypoints: "{{ matrix_mautrix_discord_container_labels_traefik_entrypoints }}"
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls: "{{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_entrypoints != 'web' }}"
|
||||
matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls_certResolver: "{{ matrix_mautrix_discord_container_labels_traefik_tls_certResolver }}" # noqa var-naming
|
||||
|
||||
# matrix_mautrix_discord_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_mautrix_discord_container_labels_additional_labels: |
|
||||
# my.label=1
|
||||
# another.label="here"
|
||||
matrix_mautrix_discord_container_labels_additional_labels: ''
|
||||
|
||||
# A list of extra arguments to pass to the container
|
||||
matrix_mautrix_discord_container_extra_arguments: []
|
||||
|
||||
@@ -56,9 +112,13 @@ matrix_mautrix_discord_appservice_token: ''
|
||||
matrix_mautrix_discord_homeserver_token: ''
|
||||
|
||||
matrix_mautrix_discord_appservice_bot_username: discordbot
|
||||
matrix_mautrix_discord_appservice_bot_displayname: Discord bridge bot
|
||||
matrix_mautrix_discord_appservice_bot_avatar: mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC
|
||||
|
||||
matrix_mautrix_discord_provisioning_shared_secret: disable
|
||||
|
||||
# Minimum severity of journal log messages.
|
||||
# Options: debug, info, warn, error, fatal
|
||||
# Options: trace, debug, info, warn, error, fatal
|
||||
matrix_mautrix_discord_logging_level: 'warn'
|
||||
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
@@ -104,9 +164,18 @@ matrix_mautrix_discord_bridge_login_shared_secret_map: "{{ matrix_mautrix_discor
|
||||
matrix_mautrix_discord_bridge_login_shared_secret_map_auto: {}
|
||||
matrix_mautrix_discord_bridge_login_shared_secret_map_custom: {}
|
||||
|
||||
|
||||
# Servers to always allow double puppeting from
|
||||
matrix_mautrix_discord_bridge_double_puppet_server_map:
|
||||
"{{ matrix_mautrix_discord_homeserver_domain : matrix_mautrix_discord_homeserver_address }}"
|
||||
matrix_mautrix_discord_bridge_double_puppet_server_map: "{{ matrix_mautrix_discord_bridge_double_puppet_server_map_default | combine(matrix_mautrix_discord_bridge_double_puppet_server_map_auto) | combine(matrix_mautrix_discord_bridge_double_puppet_server_map_custom) }}"
|
||||
matrix_mautrix_discord_bridge_double_puppet_server_map_default: |-
|
||||
{{
|
||||
{}
|
||||
| combine({
|
||||
matrix_beeper_linkedin_homeserver_domain: matrix_beeper_linkedin_homeserver_address
|
||||
})
|
||||
}}
|
||||
matrix_mautrix_discord_bridge_double_puppet_server_map_auto: {}
|
||||
matrix_mautrix_discord_bridge_double_puppet_server_map_custom: {}
|
||||
|
||||
# Default mautrix-discord configuration template which covers the generic use case.
|
||||
# You can customize it by controlling the various variables inside it.
|
||||
@@ -151,6 +220,9 @@ matrix_mautrix_discord_registration: "{{ matrix_mautrix_discord_registration_yam
|
||||
# Enable End-to-bridge encryption
|
||||
matrix_mautrix_discord_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
|
||||
matrix_mautrix_discord_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
|
||||
matrix_mautrix_discord_bridge_encryption_require: false
|
||||
matrix_mautrix_discord_bridge_encryption_appservice: false
|
||||
matrix_mautrix_discord_bridge_encryption_plaintext_mentions: false
|
||||
matrix_mautrix_discord_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_discord_bridge_encryption_allow }}"
|
||||
|
||||
# On Conduit versions before 0.5.0 this option prevented users from joining spaces created by the bridge.
|
||||
|
||||
@@ -93,6 +93,16 @@
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
|
||||
- name: Ensure mautrix-discord support files installed
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||
dest: "{{ matrix_mautrix_discord_base_path }}/{{ item }}"
|
||||
mode: 0640
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- labels
|
||||
|
||||
- name: Ensure mautrix-discord container network is created
|
||||
community.general.docker_network:
|
||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
- {'name': 'matrix_mautrix_discord_appservice_token', when: true}
|
||||
- {'name': 'matrix_mautrix_discord_homeserver_address', when: true}
|
||||
- {'name': 'matrix_mautrix_discord_homeserver_token', when: true}
|
||||
- {'name': 'matrix_mautrix_discord_homeserver_public_address', when: true}
|
||||
- {'name': 'matrix_mautrix_discord_bridge_public_address', when: true}
|
||||
- {'name': 'matrix_mautrix_discord_container_network', when: true}
|
||||
- {'name': 'matrix_mautrix_discord_database_hostname', when: "{{ matrix_mautrix_discord_database_engine == 'postgres' }}"}
|
||||
- {'name': 'matrix_mautrix_discord_container_labels_avatar_proxy_hostname', when: "{{ matrix_mautrix_discord_container_labels_avatar_proxy_enabled }}"}
|
||||
- {'name': 'matrix_mautrix_discord_container_labels_avatar_proxy_path_prefix', when: "{{ matrix_mautrix_discord_container_labels_avatar_proxy_enabled }}"}
|
||||
|
||||
- name: (Deprecation) Catch and report renamed settings
|
||||
ansible.builtin.fail:
|
||||
@@ -21,3 +23,5 @@
|
||||
when: "item.old in vars"
|
||||
with_items:
|
||||
- {'old': 'matrix_mautrix_discord_login_shared_secret', 'new': '<removed>'}
|
||||
- {'old': 'matrix_mautrix_discord_homeserver_public_address', 'new': 'matrix_mautrix_discord_bridge_public_address'}
|
||||
- {'old': 'matrix_mautrix_discord_command_prefix', 'new': 'matrix_mautrix_discord_bridge_command_prefix'}
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
homeserver:
|
||||
# The address that this appservice can use to connect to the homeserver.
|
||||
address: {{ matrix_mautrix_discord_homeserver_address | to_json }}
|
||||
# Publicly accessible base URL for media, used for avatars in relay mode.
|
||||
# If not set, the connection address above will be used.
|
||||
public_address: {{ matrix_mautrix_discord_homeserver_public_address | to_json }}
|
||||
# The domain of the homeserver (for MXIDs, etc).
|
||||
# The domain of the homeserver (also known as server_name, used for MXIDs, etc).
|
||||
domain: {{ matrix_mautrix_discord_homeserver_domain | to_json }}
|
||||
# Is the homeserver actually mautrix-asmux?
|
||||
asmux: false
|
||||
|
||||
# What software is the homeserver running?
|
||||
# Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
|
||||
software: standard
|
||||
# The URL to push real-time bridge status to.
|
||||
# If set, the bridge will make POST requests to this URL whenever a user's discord connection state changes.
|
||||
# The bridge will use the appservice as_token to authorize requests.
|
||||
@@ -19,6 +18,13 @@ homeserver:
|
||||
# Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
|
||||
async_media: false
|
||||
|
||||
# Should the bridge use a websocket for connecting to the homeserver?
|
||||
# The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
|
||||
# mautrix-asmux (deprecated), and hungryserv (proprietary).
|
||||
websocket: false
|
||||
# How often should the websocket be pinged? Pinging will be disabled if this is zero.
|
||||
ping_interval_seconds: 0
|
||||
|
||||
# Application service host/registration related details.
|
||||
# Changing these values requires regeneration of the registration.
|
||||
appservice:
|
||||
@@ -31,13 +37,14 @@ appservice:
|
||||
|
||||
# Database config.
|
||||
database:
|
||||
# The database type. "sqlite3" and "postgres" are supported.
|
||||
type: {{ matrix_mautrix_discord_appservice_database_type|to_json }}
|
||||
# The database type. "sqlite3-fk-wal" and "postgres" are supported.
|
||||
type: {{ matrix_mautrix_discord_appservice_database_type | to_json }}
|
||||
# The database URI.
|
||||
# SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
|
||||
# SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.
|
||||
# https://github.com/mattn/go-sqlite3#connection-string
|
||||
# Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
|
||||
# To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
|
||||
uri: {{ matrix_mautrix_discord_appservice_database_uri|to_json }}
|
||||
uri: {{ matrix_mautrix_discord_appservice_database_uri | to_json }}
|
||||
# Maximum number of connections. Mostly relevant for Postgres.
|
||||
max_open_conns: 20
|
||||
max_idle_conns: 2
|
||||
@@ -51,15 +58,21 @@ appservice:
|
||||
# Appservice bot details.
|
||||
bot:
|
||||
# Username of the appservice bot.
|
||||
username: {{ matrix_mautrix_discord_appservice_bot_username|to_json }}
|
||||
username: {{ matrix_mautrix_discord_appservice_bot_username | to_json }}
|
||||
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
|
||||
# to leave display name/avatar as-is.
|
||||
displayname: Discord bridge bot
|
||||
avatar: mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC
|
||||
displayname: {{ matrix_mautrix_discord_appservice_bot_displayname | to_json }}
|
||||
avatar: {{ matrix_mautrix_discord_appservice_bot_avatar | to_json }}
|
||||
|
||||
# Whether or not to receive ephemeral events via appservice transactions.
|
||||
# Requires MSC2409 support (i.e. Synapse 1.22+).
|
||||
ephemeral_events: true
|
||||
|
||||
# Should incoming events be handled asynchronously?
|
||||
# This may be necessary for large public instances with lots of messages going through.
|
||||
# However, messages will not be guaranteed to be bridged in the same order they were sent in.
|
||||
async_transactions: false
|
||||
|
||||
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
|
||||
as_token: {{ matrix_mautrix_discord_appservice_token | to_json }}
|
||||
hs_token: {{ matrix_mautrix_discord_homeserver_token | to_json }}
|
||||
@@ -67,51 +80,67 @@ appservice:
|
||||
# Bridge config
|
||||
bridge:
|
||||
# Localpart template of MXIDs for Discord users.
|
||||
# {{ '{{.}}' }} is replaced with the internal ID of the Discord user.
|
||||
username_template: "{{ 'discord_{{.}}' }}"
|
||||
# {% raw %}{{.}}{% endraw %} is replaced with the internal ID of the Discord user.
|
||||
username_template: {{ matrix_mautrix_discord_bridge_username_template | to_json }}
|
||||
# Displayname template for Discord users. This is also used as the room name in DMs if private_chat_portal_meta is enabled.
|
||||
# Available variables:
|
||||
# {{ '{{.ID}}' }} - Internal user ID
|
||||
# {{ '{{.Username}}' }} - Legacy display/username on Discord
|
||||
# {{ '{{.GlobalName}}' }} - New displayname on Discord
|
||||
# {{ '{{.Discriminator}}' }} - The 4 numbers after the name on Discord
|
||||
# {{ '{{.Bot}}' }} - Whether the user is a bot
|
||||
# {{ '{{.System}}' }} - Whether the user is an official system user
|
||||
# {{ '{{.Webhook}}' }} - Whether the user is a webhook and is not an application
|
||||
# {{ '{{.Application}}' }} - Whether the user is an application
|
||||
displayname_template: "{{ '{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}' }}"
|
||||
# .ID - Internal user ID
|
||||
# .Username - Legacy display/username on Discord
|
||||
# .GlobalName - New displayname on Discord
|
||||
# .Discriminator - The 4 numbers after the name on Discord
|
||||
# .Bot - Whether the user is a bot
|
||||
# .System - Whether the user is an official system user
|
||||
# .Webhook - Whether the user is a webhook and is not an application
|
||||
# .Application - Whether the user is an application
|
||||
displayname_template: {{ matrix_mautrix_discord_bridge_displayname_template | to_json }}
|
||||
# Displayname template for Discord channels (bridged as rooms, or spaces when type=4).
|
||||
# Available variables:
|
||||
# {{ '{{.Name}}' }} - Channel name, or user displayname (pre-formatted with displayname_template) in DMs.
|
||||
# {{ '{{.ParentName}}' }} - Parent channel name (used for categories).
|
||||
# {{ '{{.GuildName}}' }} - Guild name.
|
||||
# {{ '{{.NSFW}}' }} - Whether the channel is marked as NSFW.
|
||||
# {{ '{{.Type}}' }} - Channel type (see values at https://github.com/bwmarrin/discordgo/blob/v0.25.0/structs.go#L251-L267)
|
||||
channel_name_template: "{{ '{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}}{{else}}#{{.Name}}{{end}}' }}"
|
||||
# .Name - Channel name, or user displayname (pre-formatted with displayname_template) in DMs.
|
||||
# .ParentName - Parent channel name (used for categories).
|
||||
# .GuildName - Guild name.
|
||||
# .NSFW - Whether the channel is marked as NSFW.
|
||||
# .Type - Channel type (see values at https://github.com/bwmarrin/discordgo/blob/v0.25.0/structs.go#L251-L267)
|
||||
channel_name_template: {{ matrix_mautrix_discord_bridge_channel_name_template | to_json }}
|
||||
# Displayname template for Discord guilds (bridged as spaces).
|
||||
# Available variables:
|
||||
# {{ '{{.Name}}' }} - Guild name
|
||||
guild_name_template: "{{ '{{.Name}}' }}"
|
||||
# Should the bridge explicitly set the avatar and room name for DM portal rooms?
|
||||
# This is implicitly enabled in encrypted rooms.
|
||||
# .Name - Guild name
|
||||
guild_name_template: {{ matrix_mautrix_discord_bridge_guild_name_template | to_json }}
|
||||
# Whether to explicitly set the avatar and room name for private chat portal rooms.
|
||||
# If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
|
||||
# If set to `always`, all DM rooms will have explicit names and avatars set.
|
||||
# If set to `never`, DM rooms will never have names and avatars set.
|
||||
private_chat_portal_meta: default
|
||||
|
||||
# Publicly accessible base URL that Discord can use to reach the bridge, used for avatars in relay mode.
|
||||
# If not set, avatars will not be bridged. Only the /mautrix-discord/avatar/{server}/{id}/{hash} endpoint is used on this address.
|
||||
# This should not have a trailing slash, the endpoint above will be appended to the provided address.
|
||||
public_address: {{ matrix_mautrix_discord_bridge_public_address | to_json }}
|
||||
# A random key used to sign the avatar URLs. The bridge will only accept requests with a valid signature.
|
||||
avatar_proxy_key: {{ matrix_mautrix_discord_bridge_avatar_proxy_key | to_json }}
|
||||
|
||||
portal_message_buffer: 128
|
||||
|
||||
# Number of private channel portals to create on bridge startup.
|
||||
# Other portals will be created when receiving messages.
|
||||
startup_private_channel_create_limit: 5
|
||||
# Should the bridge send a read receipt from the bridge bot when a message has been sent to Discord?
|
||||
delivery_receipts: false
|
||||
# Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
|
||||
message_status_events: true
|
||||
message_status_events: false
|
||||
# Whether the bridge should send error notices via m.notice events when a message fails to bridge.
|
||||
message_error_notices: true
|
||||
# Should the bridge use space-restricted join rules instead of invite-only for guild rooms?
|
||||
# This can avoid unnecessary invite events in guild rooms when members are synced in.
|
||||
restricted_rooms: {{ matrix_mautrix_discord_bridge_restricted_rooms|to_json }}
|
||||
restricted_rooms: {{ matrix_mautrix_discord_bridge_restricted_rooms | to_json }}
|
||||
# Should the bridge automatically join the user to threads on Discord when the thread is opened on Matrix?
|
||||
# This only works with clients that support thread read receipts (MSC3771 added in Matrix v1.4).
|
||||
autojoin_thread_on_open: true
|
||||
# Should inline fields in Discord embeds be bridged as HTML tables to Matrix?
|
||||
# Tables aren't supported in all clients, but are the only way to emulate the Discord inline field UI.
|
||||
embed_fields_as_tables: true
|
||||
# Should guild channels be muted when the portal is created? This only meant for single-user instances,
|
||||
# it won't mute it for all users if there are multiple Matrix users in the same Discord guild.
|
||||
mute_channels_on_create: false
|
||||
# Should the bridge update the m.direct account data event when double puppeting is enabled.
|
||||
# Note that updating the m.direct event is not atomic (except with mautrix-asmux)
|
||||
# and is therefore prone to race conditions.
|
||||
@@ -120,7 +149,7 @@ bridge:
|
||||
# This field will automatically be changed back to false after it, except if the config file is not writable.
|
||||
resend_bridge_info: false
|
||||
# Should incoming custom emoji reactions be bridged as mxc:// URIs?
|
||||
# If set to false, custom emoji reactions will be bridged as the shortcode instead, and the image wont be available.
|
||||
# If set to false, custom emoji reactions will be bridged as the shortcode instead, and the image won't be available.
|
||||
custom_emoji_reactions: true
|
||||
# Should the bridge attempt to completely delete portal rooms when a channel is deleted on Discord?
|
||||
# If true, the bridge will try to kick Matrix users from the room. Otherwise, the bridge only makes ghosts leave.
|
||||
@@ -130,7 +159,7 @@ bridge:
|
||||
delete_guild_on_leave: true
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
# If false, created portal rooms will never be federated.
|
||||
federate_rooms: {{ matrix_mautrix_discord_federate_rooms|to_json }}
|
||||
federate_rooms: {{ matrix_mautrix_discord_federate_rooms | to_json }}
|
||||
# Prefix messages from webhooks with the profile info? This can be used along with a custom displayname_template
|
||||
# to better handle webhooks that change their name all the time (like ones used by bridges).
|
||||
prefix_webhook_messages: false
|
||||
@@ -140,24 +169,29 @@ bridge:
|
||||
# like the official client does? The other option is sending the media in the message send request as a form part
|
||||
# (which is always used by bots and webhooks).
|
||||
use_discord_cdn_upload: true
|
||||
# Proxy for Discord connections
|
||||
proxy:
|
||||
# Should mxc uris copied from Discord be cached?
|
||||
# This can be `never` to never cache, `unencrypted` to only cache unencrypted mxc uris, or `always` to cache everything.
|
||||
# If you have a media repo that generates non-unique mxc uris, you should set this to never.
|
||||
cache_media: unencrypted
|
||||
# Patterns for converting Discord media to custom mxc:// URIs instead of reuploading.
|
||||
# Each of the patterns can be set to null to disable custom URIs for that type of media.
|
||||
# Settings for converting Discord media to custom mxc:// URIs instead of reuploading.
|
||||
# More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html
|
||||
media_patterns:
|
||||
direct_media:
|
||||
# Should custom mxc:// URIs be used instead of reuploading media?
|
||||
enabled: false
|
||||
# Pattern for normal message attachments.
|
||||
attachments: {% raw %}mxc://discord-media.mau.dev/attachments|{{.ChannelID}}|{{.AttachmentID}}|{{.FileName}}{% endraw %}
|
||||
# Pattern for custom emojis.
|
||||
emojis: {% raw %}mxc://discord-media.mau.dev/emojis|{{.ID}}.{{.Ext}}{% endraw %}
|
||||
# Pattern for stickers. Note that animated lottie stickers will not be converted if this is enabled.
|
||||
stickers: {% raw %}mxc://discord-media.mau.dev/stickers|{{.ID}}.{{.Ext}}{% endraw %}
|
||||
# Pattern for static user avatars.
|
||||
avatars: {% raw %}mxc://discord-media.mau.dev/avatars|{{.UserID}}|{{.AvatarID}}.{{.Ext}}{% endraw %}
|
||||
# The server name to use for the custom mxc:// URIs.
|
||||
# This server name will effectively be a real Matrix server, it just won't implement anything other than media.
|
||||
# You must either set up .well-known delegation from this domain to the bridge, or proxy the domain directly to the bridge.
|
||||
server_name: discord-media.example.com
|
||||
# Optionally a custom .well-known response. This defaults to `server_name:443`
|
||||
well_known_response:
|
||||
# The bridge supports MSC3860 media download redirects and will use them if the requester supports it.
|
||||
# Optionally, you can force redirects and not allow proxying at all by setting this to false.
|
||||
allow_proxy: true
|
||||
# Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file.
|
||||
# This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them.
|
||||
server_key: ""
|
||||
# Settings for converting animated stickers.
|
||||
animated_sticker:
|
||||
# Format to which animated stickers should be converted.
|
||||
@@ -173,8 +207,7 @@ bridge:
|
||||
height: 320
|
||||
fps: 25 # only for webm, webp and gif (2, 5, 10, 20 or 25 recommended)
|
||||
# Servers to always allow double puppeting from
|
||||
double_puppet_server_map:
|
||||
"{{ matrix_mautrix_discord_homeserver_domain }}": {{ matrix_mautrix_discord_homeserver_address }}
|
||||
double_puppet_server_map: {{ matrix_mautrix_discord_bridge_double_puppet_server_map | to_json }}
|
||||
# Allow using double puppeting from any server with a valid client .well-known file.
|
||||
double_puppet_allow_discovery: false
|
||||
# Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
|
||||
@@ -182,11 +215,10 @@ bridge:
|
||||
# If set, double puppeting will be enabled automatically for local users
|
||||
# instead of users having to find an access token and run `login-matrix`
|
||||
# manually.
|
||||
login_shared_secret_map: {{ matrix_mautrix_discord_bridge_login_shared_secret_map|to_json }}
|
||||
login_shared_secret_map: {{ matrix_mautrix_discord_bridge_login_shared_secret_map | to_json }}
|
||||
|
||||
# The prefix for commands. Only required in non-management rooms.
|
||||
command_prefix: "{{ matrix_mautrix_discord_command_prefix }}"
|
||||
|
||||
command_prefix: {{ matrix_mautrix_discord_bridge_command_prefix | to_json }}
|
||||
# Messages sent upon joining a management room.
|
||||
# Markdown is supported. The defaults are listed below.
|
||||
management_room_text:
|
||||
@@ -228,15 +260,40 @@ bridge:
|
||||
# See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
|
||||
encryption:
|
||||
# Allow encryption, work in group chat rooms with e2ee enabled
|
||||
allow: {{ matrix_mautrix_discord_bridge_encryption_allow|to_json }}
|
||||
allow: {{ matrix_mautrix_discord_bridge_encryption_allow | to_json }}
|
||||
# Default to encryption, force-enable encryption in all portals the bridge creates
|
||||
# This will cause the bridge bot to be in private chats for the encryption to work properly.
|
||||
default: {{ matrix_mautrix_discord_bridge_encryption_default|to_json }}
|
||||
default: {{ matrix_mautrix_discord_bridge_encryption_default | to_json }}
|
||||
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
|
||||
appservice: {{ matrix_mautrix_discord_bridge_encryption_appservice | to_json}}
|
||||
# Require encryption, drop any unencrypted messages.
|
||||
require: false
|
||||
require: {{ matrix_mautrix_discord_bridge_encryption_require | to_json }}
|
||||
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
|
||||
# You must use a client that supports requesting keys from other users to use this feature.
|
||||
allow_key_sharing: {{ matrix_mautrix_discord_bridge_encryption_key_sharing_allow|to_json }}
|
||||
allow_key_sharing: {{ matrix_mautrix_discord_bridge_encryption_key_sharing_allow | to_json }}
|
||||
# Should users mentions be in the event wire content to enable the server to send push notifications?
|
||||
plaintext_mentions: {{ matrix_mautrix_discord_bridge_encryption_plaintext_mentions | to_json }}
|
||||
# Options for deleting megolm sessions from the bridge.
|
||||
delete_keys:
|
||||
# Beeper-specific: delete outbound sessions when hungryserv confirms
|
||||
# that the user has uploaded the key to key backup.
|
||||
delete_outbound_on_ack: false
|
||||
# Don't store outbound sessions in the inbound table.
|
||||
dont_store_outbound: false
|
||||
# Ratchet megolm sessions forward after decrypting messages.
|
||||
ratchet_on_decrypt: false
|
||||
# Delete fully used keys (index >= max_messages) after decrypting messages.
|
||||
delete_fully_used_on_decrypt: false
|
||||
# Delete previous megolm sessions from same device when receiving a new one.
|
||||
delete_prev_on_new_session: false
|
||||
# Delete megolm sessions received from a device when the device is deleted.
|
||||
delete_on_device_delete: false
|
||||
# Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
|
||||
periodically_delete_expired: false
|
||||
# Delete inbound megolm sessions that don't have the received_at field used for
|
||||
# automatic ratcheting and expired session deletion. This is meant as a migration
|
||||
# to delete old keys prior to the bridge update.
|
||||
delete_outdated_inbound: false
|
||||
# What level of device verification should be required from users?
|
||||
#
|
||||
# Valid levels:
|
||||
@@ -272,13 +329,19 @@ bridge:
|
||||
# default.
|
||||
messages: 100
|
||||
|
||||
# Disable rotating keys when a user's devices change?
|
||||
# You should not enable this option unless you understand all the implications.
|
||||
disable_device_change_key_rotation: false
|
||||
|
||||
# Settings for provisioning API
|
||||
provisioning:
|
||||
# Prefix for the provisioning API paths.
|
||||
prefix: /_matrix/provision
|
||||
# Shared secret for authentication. If set to "generate", a random secret will be generated,
|
||||
# or if set to "disable", the provisioning API will be disabled.
|
||||
shared_secret: generate
|
||||
shared_secret: {{ matrix_mautrix_discord_provisioning_shared_secret | to_json }}
|
||||
# Enable debug API at /debug with provisioning authentication.
|
||||
debug_endpoints: false
|
||||
|
||||
# Permissions for using the bridge.
|
||||
# Permitted values:
|
||||
@@ -291,12 +354,9 @@ bridge:
|
||||
# mxid - Specific user
|
||||
permissions: {{ matrix_mautrix_discord_bridge_permissions|to_json }}
|
||||
|
||||
# Logging config. See https://github.com/tulir/zeroconfig for details.
|
||||
logging:
|
||||
directory: ./logs
|
||||
file_name_format: ''
|
||||
file_date_format: "2006-01-02"
|
||||
file_mode: 384
|
||||
timestamp_format: Jan _2, 2006 15:04:05
|
||||
print_level: {{ matrix_mautrix_discord_logging_level | to_json }}
|
||||
print_json: false
|
||||
file_json: false
|
||||
min_level: {{ matrix_mautrix_discord_logging_level | to_json }}
|
||||
writers:
|
||||
- type: stdout
|
||||
format: pretty-colored
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_enabled %}
|
||||
traefik.enable=true
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_docker_network %}
|
||||
traefik.docker.network={{ matrix_mautrix_discord_container_labels_traefik_docker_network }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.services.matrix-mautrix-discord.loadbalancer.server.port=8080
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_avatar_proxy_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Avatar proxy #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
{% set middlewares = [] %}
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
|
||||
traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.regex=({{ matrix_mautrix_discord_container_labels_traefik_path_prefix | quote }})$
|
||||
traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.replacement=${1}/
|
||||
{% set middlewares = middlewares + ['matrix-mautrix-discord-slashless-redirect'] %}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
|
||||
traefik.http.middlewares.matrix-mautrix-discord-strip-prefix.stripprefix.prefixes={{ matrix_mautrix_discord_container_labels_traefik_path_prefix }}
|
||||
{% set middlewares = middlewares + ['matrix-mautrix-discord-strip-prefix'] %}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.rule={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_rule }}
|
||||
|
||||
{% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority | int > 0 %}
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.priority={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority }}
|
||||
{% endif %}
|
||||
|
||||
{% if middlewares | length > 0 %}
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.middlewares={{ middlewares | join(',') }}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.service=matrix-mautrix-discord
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.entrypoints={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_entrypoints }}
|
||||
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls | to_json }}
|
||||
{% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls %}
|
||||
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls.certResolver={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Avatar proxy #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{ matrix_mautrix_discord_container_labels_additional_labels }}
|
||||
@@ -23,6 +23,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--network={{ matrix_mautrix_discord_container_network }} \
|
||||
--label-file={{ matrix_mautrix_discord_base_path }}/labels \
|
||||
--mount type=bind,src={{ matrix_mautrix_discord_config_path }},dst=/config,ro \
|
||||
--mount type=bind,src={{ matrix_mautrix_discord_data_path }},dst=/data \
|
||||
--workdir=/data \
|
||||
|
||||
@@ -211,8 +211,8 @@ bridge:
|
||||
#
|
||||
# Available variables:
|
||||
# $sender_displayname - The display name of the sender (e.g. Example User)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. exampleuser)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @exampleuser:example.com)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. alice)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @alice:example.com)
|
||||
# $message - The message content
|
||||
message_formats:
|
||||
m.text: '<b>$sender_displayname</b>: $message'
|
||||
|
||||
@@ -9,7 +9,7 @@ matrix_mautrix_gmessages_container_image_self_build_repo: "https://github.com/ma
|
||||
matrix_mautrix_gmessages_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_gmessages_version == 'latest' else matrix_mautrix_gmessages_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/gmessages
|
||||
matrix_mautrix_gmessages_version: v0.5.1
|
||||
matrix_mautrix_gmessages_version: v0.6.0
|
||||
|
||||
# See: https://mau.dev/mautrix/gmessages/container_registry
|
||||
matrix_mautrix_gmessages_docker_image: "{{ matrix_mautrix_gmessages_docker_image_name_prefix }}mautrix/gmessages:{{ matrix_mautrix_gmessages_version }}"
|
||||
@@ -86,7 +86,7 @@ matrix_mautrix_gmessages_homeserver_token: ''
|
||||
matrix_mautrix_gmessages_appservice_bot_username: gmessagesbot
|
||||
|
||||
# Minimum severity of journal log messages.
|
||||
# Options: debug, info, warn, error, fatal
|
||||
# Options: trace, debug, info, warn, error, fatal
|
||||
matrix_mautrix_gmessages_logging_level: 'warn'
|
||||
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
---
|
||||
|
||||
- ansible.builtin.fail:
|
||||
msg: |-
|
||||
The Google Hangouts service was discontinued on November 1st, 2022.
|
||||
The mautrix-hangouts bridge (which you have enabled via the `matrix_mautrix_hangouts_enabled` variable) will be removed from the playbook soon (in February 2025).
|
||||
|
||||
We suggest that you uninstall this bridge by:
|
||||
1. Tweaking your `vars.yml` file - setting `matrix_mautrix_hangouts_enabled` to `false` or better yet removing all `matrix_mautrix_hangouts_*` variables
|
||||
2. Re-running the playbook with the `setup-all` (e.g. `just setup-all`) or `setup-mautrix-hangouts` tag (e.g. `just run-tags setup-mautrix-hangouts`), so that uninstallation tasks will run.
|
||||
|
||||
In the future, an error will be raised for any `matrix_mautrix_hangouts_*` variables that the playbook detects in your `vars.yml` configuration file.
|
||||
|
||||
Also see: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3863
|
||||
|
||||
- name: Fail if required mautrix-hangouts settings not defined
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
|
||||
@@ -204,8 +204,8 @@ bridge:
|
||||
#
|
||||
# Available variables:
|
||||
# $sender_displayname - The display name of the sender (e.g. Example User)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. exampleuser)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @exampleuser:example.com)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. alice)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @alice:example.com)
|
||||
# $message - The message content
|
||||
#
|
||||
# Note that Instagram doesn't support captions for images, so images won't include any indication of being relayed.
|
||||
|
||||
@@ -13,7 +13,7 @@ matrix_mautrix_meta_instagram_enabled: true
|
||||
matrix_mautrix_meta_instagram_identifier: matrix-mautrix-meta-instagram
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/meta
|
||||
matrix_mautrix_meta_instagram_version: v0.4.1
|
||||
matrix_mautrix_meta_instagram_version: v0.4.3
|
||||
|
||||
matrix_mautrix_meta_instagram_base_path: "{{ matrix_base_data_path }}/mautrix-meta-instagram"
|
||||
matrix_mautrix_meta_instagram_config_path: "{{ matrix_mautrix_meta_instagram_base_path }}/config"
|
||||
@@ -156,6 +156,8 @@ matrix_mautrix_meta_instagram_meta_mode: instagram
|
||||
# When in `instagram` mode (see `matrix_mautrix_meta_instagram_meta_mode`), should the bridge connect to WhatsApp servers for encrypted chats?
|
||||
matrix_mautrix_meta_instagram_meta_ig_e2ee: false
|
||||
|
||||
matrix_mautrix_meta_instagram_provisioning_shared_secret: disable
|
||||
|
||||
# Whether or not metrics endpoint should be enabled.
|
||||
# Enabling them is usually enough for a local (in-container) Prometheus to consume them.
|
||||
# If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_meta_instagram_metrics_proxying_enabled`.
|
||||
|
||||
@@ -263,7 +263,7 @@ provisioning:
|
||||
prefix: /_matrix/provision
|
||||
# Shared secret for authentication. If set to "generate" or null, a random secret will be generated,
|
||||
# or if set to "disable", the provisioning API will be disabled.
|
||||
shared_secret: disable
|
||||
shared_secret: {{ matrix_mautrix_meta_instagram_provisioning_shared_secret | to_json }}
|
||||
# Whether to allow provisioning API requests to be authed using Matrix access tokens.
|
||||
# This follows the same rules as double puppeting to determine which server to contact to check the token,
|
||||
# which means that by default, it only works for users on the same server as the bridge.
|
||||
|
||||
@@ -13,7 +13,7 @@ matrix_mautrix_meta_messenger_enabled: true
|
||||
matrix_mautrix_meta_messenger_identifier: matrix-mautrix-meta-messenger
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/meta
|
||||
matrix_mautrix_meta_messenger_version: v0.4.1
|
||||
matrix_mautrix_meta_messenger_version: v0.4.3
|
||||
|
||||
matrix_mautrix_meta_messenger_base_path: "{{ matrix_base_data_path }}/mautrix-meta-messenger"
|
||||
matrix_mautrix_meta_messenger_config_path: "{{ matrix_mautrix_meta_messenger_base_path }}/config"
|
||||
@@ -156,6 +156,8 @@ matrix_mautrix_meta_messenger_meta_mode: messenger
|
||||
# When in `instagram` mode (see `matrix_mautrix_meta_messenger_meta_mode`), should the bridge connect to WhatsApp servers for encrypted chats?
|
||||
matrix_mautrix_meta_messenger_meta_ig_e2ee: false
|
||||
|
||||
matrix_mautrix_meta_messenger_provisioning_shared_secret: disable
|
||||
|
||||
# Whether or not metrics endpoint should be enabled.
|
||||
# Enabling them is usually enough for a local (in-container) Prometheus to consume them.
|
||||
# If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_meta_messenger_metrics_proxying_enabled`.
|
||||
|
||||
@@ -263,7 +263,7 @@ provisioning:
|
||||
prefix: /_matrix/provision
|
||||
# Shared secret for authentication. If set to "generate" or null, a random secret will be generated,
|
||||
# or if set to "disable", the provisioning API will be disabled.
|
||||
shared_secret: disable
|
||||
shared_secret: {{ matrix_mautrix_meta_messenger_provisioning_shared_secret | to_json }}
|
||||
# Whether to allow provisioning API requests to be authed using Matrix access tokens.
|
||||
# This follows the same rules as double puppeting to determine which server to contact to check the token,
|
||||
# which means that by default, it only works for users on the same server as the bridge.
|
||||
|
||||
@@ -9,7 +9,7 @@ matrix_mautrix_signal_container_image_self_build_repo: "https://mau.dev/mautrix/
|
||||
matrix_mautrix_signal_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_signal_version == 'latest' else matrix_mautrix_signal_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/signal
|
||||
matrix_mautrix_signal_version: v0.7.2
|
||||
matrix_mautrix_signal_version: v0.7.5
|
||||
|
||||
# See: https://mau.dev/mautrix/signal/container_registry
|
||||
matrix_mautrix_signal_docker_image: "{{ matrix_mautrix_signal_docker_image_name_prefix }}mautrix/signal:{{ matrix_mautrix_signal_docker_image_tag }}"
|
||||
@@ -93,7 +93,7 @@ matrix_mautrix_signal_homeserver_token: ''
|
||||
matrix_mautrix_signal_appservice_bot_username: signalbot
|
||||
|
||||
# Minimum severity of journal log messages.
|
||||
# Options: debug, info, warn, error, fatal
|
||||
# Options: trace, debug, info, warn, error, fatal
|
||||
matrix_mautrix_signal_logging_level: 'warn'
|
||||
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
|
||||
@@ -9,7 +9,7 @@ matrix_mautrix_slack_container_image_self_build_repo: "https://mau.dev/mautrix/s
|
||||
matrix_mautrix_slack_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_slack_version == 'latest' else matrix_mautrix_slack_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/slack
|
||||
matrix_mautrix_slack_version: v0.1.2
|
||||
matrix_mautrix_slack_version: v0.1.4
|
||||
# See: https://mau.dev/mautrix/slack/container_registry
|
||||
matrix_mautrix_slack_docker_image: "{{ matrix_mautrix_slack_docker_image_name_prefix }}mautrix/slack:{{ matrix_mautrix_slack_version }}"
|
||||
matrix_mautrix_slack_docker_image_name_prefix: "{{ 'localhost/' if matrix_mautrix_slack_container_image_self_build else 'dock.mau.dev/' }}"
|
||||
@@ -62,7 +62,7 @@ matrix_mautrix_slack_backfill_unread_hours_threshold: 720
|
||||
matrix_mautrix_slack_backfill_threads_max_initial_messages: 50
|
||||
|
||||
# Minimum severity of journal log messages.
|
||||
# Options: debug, info, warn, error, fatal
|
||||
# Options: trace, debug, info, warn, error, fatal
|
||||
matrix_mautrix_slack_logging_level: 'warn'
|
||||
|
||||
# Database-related configuration fields.
|
||||
|
||||
@@ -136,6 +136,8 @@ matrix_mautrix_telegram_systemd_wanted_services_list: []
|
||||
matrix_mautrix_telegram_appservice_token: ''
|
||||
matrix_mautrix_telegram_homeserver_token: ''
|
||||
|
||||
matrix_mautrix_telegram_provisioning_shared_secret: disable
|
||||
|
||||
# Whether or not metrics endpoint should be enabled.
|
||||
# Enabling them is usually enough for a local (in-container) Prometheus to consume them.
|
||||
# If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_telegram_metrics_proxying_enabled`.
|
||||
|
||||
@@ -71,7 +71,7 @@ appservice:
|
||||
prefix: /_matrix/provision/v1
|
||||
# The shared secret to authorize users of the API.
|
||||
# Set to "generate" to generate and save a new token.
|
||||
shared_secret: generate
|
||||
shared_secret: {{ matrix_mautrix_telegram_provisioning_shared_secret | to_json }}
|
||||
|
||||
# The unique ID of this appservice.
|
||||
id: telegram
|
||||
@@ -122,7 +122,7 @@ bridge:
|
||||
# Default: {displayname} (Telegram)
|
||||
displayname_template: {{ matrix_mautrix_telegram_displayname_template|to_json }}
|
||||
|
||||
# Set the preferred order of user identifiers which to use in the Matrix puppet display name.
|
||||
# Set the preferred order of user IDs which to use in the Matrix puppet display name.
|
||||
# In the (hopefully unlikely) scenario that none of the given keys are found, the numeric user
|
||||
# ID is used.
|
||||
#
|
||||
@@ -450,8 +450,8 @@ bridge:
|
||||
#
|
||||
# Available variables:
|
||||
# $sender_displayname - The display name of the sender (e.g. Example User)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. exampleuser)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @exampleuser:example.com)
|
||||
# $sender_username - The username (Matrix ID localpart) of the sender (e.g. alice)
|
||||
# $sender_mxid - The Matrix ID of the sender (e.g. @alice:example.com)
|
||||
# $distinguisher - A random string from the options in the relay_user_distinguishers array.
|
||||
# $message - The message content
|
||||
message_formats:
|
||||
|
||||
@@ -9,7 +9,7 @@ matrix_mautrix_twitter_container_image_self_build_repo: "https://github.com/maut
|
||||
matrix_mautrix_twitter_container_image_self_build_repo_version: "{{ 'master' if matrix_mautrix_twitter_version == 'latest' else matrix_mautrix_twitter_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/twitter
|
||||
matrix_mautrix_twitter_version: v0.1.8
|
||||
matrix_mautrix_twitter_version: v0.2.1
|
||||
# See: https://mau.dev/tulir/mautrix-twitter/container_registry
|
||||
matrix_mautrix_twitter_docker_image: "{{ matrix_mautrix_twitter_docker_image_name_prefix }}mautrix/twitter:{{ matrix_mautrix_twitter_version }}"
|
||||
matrix_mautrix_twitter_docker_image_name_prefix: "{{ 'localhost/' if matrix_mautrix_twitter_container_image_self_build else 'dock.mau.dev/' }}"
|
||||
@@ -24,7 +24,10 @@ matrix_mautrix_twitter_homeserver_address: ""
|
||||
matrix_mautrix_twitter_homeserver_domain: '{{ matrix_domain }}'
|
||||
matrix_mautrix_twitter_appservice_address: 'http://matrix-mautrix-twitter:29327'
|
||||
|
||||
matrix_mautrix_twitter_command_prefix: "!tw"
|
||||
# A public address that external services can use to reach this appservice.
|
||||
matrix_mautrix_twitter_appservice_public_address: ''
|
||||
|
||||
matrix_mautrix_twitter_bridge_command_prefix: "!tw"
|
||||
|
||||
matrix_mautrix_twitter_bridge_permissions: |
|
||||
{{
|
||||
@@ -84,7 +87,7 @@ matrix_mautrix_twitter_homeserver_token: ''
|
||||
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
# If false, created portal rooms will never be federated.
|
||||
matrix_mautrix_twitter_federate_rooms: true
|
||||
matrix_mautrix_twitter_matrix_federate_rooms: true
|
||||
|
||||
# Database-related configuration fields.
|
||||
#
|
||||
@@ -97,23 +100,38 @@ matrix_mautrix_twitter_database_password: 'some-password'
|
||||
matrix_mautrix_twitter_database_hostname: ''
|
||||
matrix_mautrix_twitter_database_port: 5432
|
||||
matrix_mautrix_twitter_database_name: 'matrix_mautrix_twitter'
|
||||
matrix_mautrix_twitter_database_sslmode: disable
|
||||
|
||||
matrix_mautrix_twitter_database_connection_string: 'postgres://{{ matrix_mautrix_twitter_database_username }}:{{ matrix_mautrix_twitter_database_password }}@{{ matrix_mautrix_twitter_database_hostname }}:{{ matrix_mautrix_twitter_database_port }}/{{ matrix_mautrix_twitter_database_name }}'
|
||||
matrix_mautrix_twitter_database_connection_string: 'postgres://{{ matrix_mautrix_twitter_database_username }}:{{ matrix_mautrix_twitter_database_password }}@{{ matrix_mautrix_twitter_database_hostname }}:{{ matrix_mautrix_twitter_database_port }}/{{ matrix_mautrix_twitter_database_name }}?sslmode={{ matrix_mautrix_twitter_database_sslmode }}'
|
||||
|
||||
matrix_mautrix_twitter_appservice_database: "{{
|
||||
matrix_mautrix_twitter_database_uri: "{{
|
||||
{
|
||||
'postgres': matrix_mautrix_twitter_database_connection_string,
|
||||
}[matrix_mautrix_twitter_database_engine]
|
||||
}}"
|
||||
|
||||
matrix_mautrix_twitter_bridge_login_shared_secret_map: "{{ matrix_mautrix_twitter_bridge_login_shared_secret_map_auto | combine(matrix_mautrix_twitter_bridge_login_shared_secret_map_custom) }}"
|
||||
matrix_mautrix_twitter_bridge_login_shared_secret_map_auto: {}
|
||||
matrix_mautrix_twitter_bridge_login_shared_secret_map_custom: {}
|
||||
matrix_mautrix_twitter_double_puppet_secrets: "{{ matrix_mautrix_twitter_double_puppet_secrets_auto | combine(matrix_mautrix_twitter_double_puppet_secrets_custom) }}"
|
||||
matrix_mautrix_twitter_double_puppet_secrets_auto: {}
|
||||
matrix_mautrix_twitter_double_puppet_secrets_custom: {}
|
||||
|
||||
matrix_mautrix_twitter_appservice_bot_username: twitterbot
|
||||
matrix_mautrix_twitter_appservice_bot_displayname: Twitter bridge bot
|
||||
matrix_mautrix_twitter_appservice_bot_avatar: mxc://maunium.net/HVHcnusJkQcpVcsVGZRELLCn
|
||||
|
||||
# Specifies the default log level for all bridge loggers.
|
||||
matrix_mautrix_twitter_logging_level: WARNING
|
||||
matrix_mautrix_twitter_backfill_enabled: true
|
||||
# Maximum number of messages to backfill in empty rooms
|
||||
matrix_mautrix_twitter_backfill_max_initial_messages: 50
|
||||
|
||||
# Maximum number of missed messages to backfill after bridge restarts
|
||||
matrix_mautrix_twitter_backfill_max_catchup_messages: 500
|
||||
|
||||
# Shared secret for authentication of provisioning API requests.
|
||||
# If set to "disable", the provisioning API will be disabled.
|
||||
matrix_mautrix_twitter_provisioning_shared_secret: disable
|
||||
|
||||
# Minimum severity of journal log messages.
|
||||
# Options: trace, debug, info, warn, error, fatal
|
||||
matrix_mautrix_twitter_logging_level: 'warn'
|
||||
|
||||
# Whether or not metrics endpoint should be enabled.
|
||||
# Enabling them is usually enough for a local (in-container) Prometheus to consume them.
|
||||
@@ -162,10 +180,15 @@ matrix_mautrix_twitter_registration_yaml: |
|
||||
sender_localpart: _bot_{{ matrix_mautrix_twitter_appservice_bot_username }}
|
||||
rate_limited: false
|
||||
de.sorunome.msc2409.push_ephemeral: true
|
||||
receive_ephemeral: true
|
||||
|
||||
matrix_mautrix_twitter_registration: "{{ matrix_mautrix_twitter_registration_yaml | from_yaml }}"
|
||||
|
||||
# Enable End-to-bridge encryption
|
||||
matrix_mautrix_twitter_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
|
||||
matrix_mautrix_twitter_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
|
||||
matrix_mautrix_twitter_bridge_encryption_require: false
|
||||
matrix_mautrix_twitter_bridge_encryption_appservice: false
|
||||
matrix_mautrix_twitter_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_twitter_bridge_encryption_allow }}"
|
||||
# This pickle key value is compatible with the old mautrix-twitter bridge (before bridgev2).
|
||||
matrix_mautrix_twitter_bridge_encryption_pickle_key: mautrix.bridge.e2ee
|
||||
|
||||
@@ -22,3 +22,9 @@
|
||||
when: "item.old in vars"
|
||||
with_items:
|
||||
- {'old': 'matrix_mautrix_twitter_login_shared_secret', 'new': '<removed>'}
|
||||
- {'old': 'matrix_mautrix_twitter_appservice_database', 'new': 'matrix_mautrix_twitter_database_uri'}
|
||||
- {'old': 'matrix_mautrix_twitter_bridge_login_shared_secret_map', 'new': 'matrix_mautrix_twitter_double_puppet_secrets'}
|
||||
- {'old': 'matrix_mautrix_twitter_bridge_login_shared_secret_map_auto', 'new': 'matrix_mautrix_twitter_double_puppet_secrets_auto'}
|
||||
- {'old': 'matrix_mautrix_twitter_bridge_login_shared_secret_map_custom', 'new': 'matrix_mautrix_twitter_double_puppet_secrets_custom'}
|
||||
- {'old': 'matrix_mautrix_twitter_federate_rooms', 'new': 'matrix_mautrix_twitter_matrix_federate_rooms'}
|
||||
- {'old': 'matrix_mautrix_twitter_command_prefix', 'new': 'matrix_mautrix_twitter_bridge_command_prefix'}
|
||||
|
||||
@@ -1,202 +1,428 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
# Homeserver details
|
||||
homeserver:
|
||||
# The address that this appservice can use to connect to the homeserver.
|
||||
address: {{ matrix_mautrix_twitter_homeserver_address }}
|
||||
# The domain of the homeserver (for MXIDs, etc).
|
||||
domain: {{ matrix_mautrix_twitter_homeserver_domain }}
|
||||
# Whether or not to verify the SSL certificate of the homeserver.
|
||||
# Only applies if address starts with https://
|
||||
verify_ssl: true
|
||||
asmux: false
|
||||
# Network-specific config options
|
||||
network:
|
||||
# Proxy to use for all Twitter connections.
|
||||
proxy: null
|
||||
# Alternative to proxy: an HTTP endpoint that returns the proxy URL to use for Twitter connections.
|
||||
get_proxy_url: null
|
||||
|
||||
# Application service host/registration related details
|
||||
# Changing these values requires regeneration of the registration.
|
||||
appservice:
|
||||
# The address that the homeserver can use to connect to this appservice.
|
||||
address: {{ matrix_mautrix_twitter_appservice_address }}
|
||||
# When using https:// the TLS certificate and key files for the address.
|
||||
tls_cert: false
|
||||
tls_key: false
|
||||
|
||||
# The hostname and port where this appservice should listen.
|
||||
hostname: 0.0.0.0
|
||||
port: 29327
|
||||
# The maximum body size of appservice API requests (from the homeserver) in mebibytes
|
||||
# Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
|
||||
max_body_size: 1
|
||||
|
||||
# The full URI to the database. Only Postgres is currently supported.
|
||||
database: {{ matrix_mautrix_twitter_appservice_database|to_json }}
|
||||
# Additional arguments for asyncpg.create_pool()
|
||||
# https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.pool.create_pool
|
||||
database_opts:
|
||||
min_size: 5
|
||||
max_size: 10
|
||||
|
||||
# Provisioning API part of the web server for automated portal creation and fetching information.
|
||||
# Used by things like mautrix-manager (https://github.com/tulir/mautrix-manager).
|
||||
provisioning:
|
||||
# Whether or not the provisioning API should be enabled.
|
||||
enabled: true
|
||||
# The prefix to use in the provisioning API endpoints.
|
||||
prefix: /_matrix/provision/v1
|
||||
# The shared secret to authorize users of the API.
|
||||
# Set to "generate" to generate and save a new token.
|
||||
shared_secret: generate
|
||||
|
||||
# The unique ID of this appservice.
|
||||
id: twitter
|
||||
# Username of the appservice bot.
|
||||
bot_username: {{ matrix_mautrix_twitter_appservice_bot_username|to_json }}
|
||||
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
|
||||
# to leave display name/avatar as-is.
|
||||
bot_displayname: Twitter bridge bot
|
||||
bot_avatar: mxc://maunium.net/HVHcnusJkQcpVcsVGZRELLCn
|
||||
|
||||
# Whether or not to receive ephemeral events via appservice transactions.
|
||||
# Requires MSC2409 support (i.e. Synapse 1.22+).
|
||||
# You should disable bridge -> sync_with_custom_puppets when this is enabled.
|
||||
ephemeral_events: false
|
||||
|
||||
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
|
||||
as_token: "{{ matrix_mautrix_twitter_appservice_token }}"
|
||||
hs_token: "{{ matrix_mautrix_twitter_homeserver_token }}"
|
||||
|
||||
# Prometheus telemetry config. Requires prometheus-client to be installed.
|
||||
metrics:
|
||||
enabled: {{ matrix_mautrix_twitter_metrics_enabled | to_json }}
|
||||
listen_port: 8000
|
||||
|
||||
# Bridge config
|
||||
bridge:
|
||||
# Localpart template of MXIDs for Twitter users.
|
||||
# {userid} is replaced with the user ID of the Twitter user.
|
||||
username_template: "twitter_{userid}"
|
||||
# Displayname template for Twitter users.
|
||||
# {displayname} is replaced with the display name of the Twitter user.
|
||||
# {username} is replaced with the username of the Twitter user.
|
||||
displayname_template: "{displayname} (Twitter)"
|
||||
# {% raw %}
|
||||
# {{ .DisplayName }} is replaced with the display name of the Twitter user.
|
||||
# {{ .Username }} is replaced with the username of the Twitter user.
|
||||
# {% endraw %}
|
||||
displayname_template: "{% raw %}{{ .DisplayName }}{% endraw %} (Twitter)"
|
||||
|
||||
# Maximum length of displayname
|
||||
displayname_max_length: 100
|
||||
# Maximum number of conversations to sync on startup
|
||||
conversation_sync_limit: 20
|
||||
|
||||
# Number of conversations to sync (and create portals for) on login.
|
||||
# Set 0 to disable automatic syncing.
|
||||
initial_conversation_sync: 10
|
||||
# Whether or not to use /sync to get read receipts and typing notifications
|
||||
# when double puppeting is enabled
|
||||
sync_with_custom_puppets: true
|
||||
# Whether or not to update the m.direct account data event when double puppeting is enabled.
|
||||
# Note that updating the m.direct event is not atomic (except with mautrix-asmux)
|
||||
# and is therefore prone to race conditions.
|
||||
sync_direct_chat_list: false
|
||||
# Allow using double puppeting from any server with a valid client .well-known file.
|
||||
double_puppet_allow_discovery: false
|
||||
# Servers to allow double puppeting from, even if double_puppet_allow_discovery is false.
|
||||
double_puppet_server_map: {}
|
||||
# Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
|
||||
#
|
||||
# If set, custom puppets will be enabled automatically for local users
|
||||
# instead of users having to find an access token and run `login-matrix`
|
||||
# manually.
|
||||
# If using this for other servers than the bridge's server,
|
||||
# you must also set the URL in the double_puppet_server_map.
|
||||
login_shared_secret_map: {{ matrix_mautrix_twitter_bridge_login_shared_secret_map|to_json }}
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
# If false, created portal rooms will never be federated.
|
||||
federate_rooms: {{ matrix_mautrix_twitter_federate_rooms|to_json }}
|
||||
# Settings for backfilling messages from Twitter.
|
||||
#
|
||||
# Missed message backfilling is currently based on receiving them from the Twitter polling API,
|
||||
# rather than manually asking for messages in each conversation. Due to this, there's no way to
|
||||
# set a limit for missed message backfilling.
|
||||
backfill:
|
||||
# Whether or not the Twitter users of logged in Matrix users should be
|
||||
# invited to private chats when backfilling history from Twitter. This is
|
||||
# usually needed to prevent rate limits and to allow timestamp massaging.
|
||||
invite_own_puppet: true
|
||||
# Maximum number of messages to backfill initially.
|
||||
# Set to 0 to disable backfilling when creating portal.
|
||||
initial_limit: 0
|
||||
# If using double puppeting, should notifications be disabled
|
||||
# while the initial backfill is in progress?
|
||||
disable_notifications: true
|
||||
# End-to-bridge encryption support options. You must install the e2be optional dependency for
|
||||
# this to work. See https://github.com/tulir/mautrix-telegram/wiki/End‐to‐bridge-encryption
|
||||
encryption:
|
||||
# Allow encryption, work in group chat rooms with e2ee enabled
|
||||
allow: {{ matrix_mautrix_twitter_bridge_encryption_allow|to_json }}
|
||||
# Default to encryption, force-enable encryption in all portals the bridge creates
|
||||
# This will cause the bridge bot to be in private chats for the encryption to work properly.
|
||||
default: {{ matrix_mautrix_twitter_bridge_encryption_default|to_json }}
|
||||
# Options for automatic key sharing.
|
||||
key_sharing:
|
||||
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
|
||||
# You must use a client that supports requesting keys from other users to use this feature.
|
||||
allow: {{ matrix_mautrix_twitter_bridge_encryption_key_sharing_allow|to_json }}
|
||||
# Require the requesting device to have a valid cross-signing signature?
|
||||
# This doesn't require that the bridge has verified the device, only that the user has verified it.
|
||||
# Not yet implemented.
|
||||
require_cross_signing: false
|
||||
# Require devices to be verified by the bridge?
|
||||
# Verification by the bridge is not yet implemented.
|
||||
require_verification: true
|
||||
# Whether or not to explicitly set the avatar and room name for private
|
||||
# chat portal rooms. This will be implicitly enabled if encryption.default is true.
|
||||
private_chat_portal_meta: false
|
||||
# Whether or not the bridge should send a read receipt from the bridge bot when a message has
|
||||
# been sent to Twitter.
|
||||
delivery_receipts: false
|
||||
# Whether or not delivery errors should be reported as messages in the Matrix room.
|
||||
delivery_error_reports: true
|
||||
# Whether or not non-fatal polling errors should send notices to the notice room.
|
||||
temporary_disconnect_notices: true
|
||||
# Number of seconds to sleep more than the previous error when a polling error occurs.
|
||||
# Growth is capped at 15 minutes.
|
||||
error_sleep: 5
|
||||
# Maximum number of polling errors before giving up. Set to -1 to retry forever.
|
||||
max_poll_errors: 12
|
||||
# Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
|
||||
# This field will automatically be changed back to false after it,
|
||||
# except if the config file is not writable.
|
||||
|
||||
# Config options that affect the central bridge module.
|
||||
bridge:
|
||||
# The prefix for commands. Only required in non-management rooms.
|
||||
command_prefix: {{ matrix_mautrix_twitter_bridge_command_prefix | to_json }}
|
||||
# Should the bridge create a space for each login containing the rooms that account is in?
|
||||
personal_filtering_spaces: true
|
||||
# Whether the bridge should set names and avatars explicitly for DM portals.
|
||||
# This is only necessary when using clients that don't support MSC4171.
|
||||
private_chat_portal_meta: true
|
||||
# Should events be handled asynchronously within portal rooms?
|
||||
# If true, events may end up being out of order, but slow events won't block other ones.
|
||||
# This is not yet safe to use.
|
||||
async_events: false
|
||||
# Should every user have their own portals rather than sharing them?
|
||||
# By default, users who are in the same group on the remote network will be
|
||||
# in the same Matrix room bridged to that group. If this is set to true,
|
||||
# every user will get their own Matrix room instead.
|
||||
split_portals: false
|
||||
# Should the bridge resend `m.bridge` events to all portals on startup?
|
||||
resend_bridge_info: false
|
||||
|
||||
# The prefix for commands. Only required in non-management rooms.
|
||||
command_prefix: "{{ matrix_mautrix_twitter_command_prefix }}"
|
||||
# Should leaving Matrix rooms be bridged as leaving groups on the remote network?
|
||||
bridge_matrix_leave: false
|
||||
# Should room tags only be synced when creating the portal? Tags mean things like favorite/pin and archive/low priority.
|
||||
# Tags currently can't be synced back to the remote network, so a continuous sync means tagging from Matrix will be undone.
|
||||
tag_only_on_create: true
|
||||
# List of tags to allow bridging. If empty, no tags will be bridged.
|
||||
only_bridge_tags: [m.favourite, m.lowpriority]
|
||||
# Should room mute status only be synced when creating the portal?
|
||||
# Like tags, mutes can't currently be synced back to the remote network.
|
||||
mute_only_on_create: true
|
||||
|
||||
# What should be done to portal rooms when a user logs out or is logged out?
|
||||
# Permitted values:
|
||||
# nothing - Do nothing, let the user stay in the portals
|
||||
# kick - Remove the user from the portal rooms, but don't delete them
|
||||
# unbridge - Remove all ghosts in the room and disassociate it from the remote chat
|
||||
# delete - Remove all ghosts and users from the room (i.e. delete it)
|
||||
cleanup_on_logout:
|
||||
# Should cleanup on logout be enabled at all?
|
||||
enabled: false
|
||||
# Settings for manual logouts (explicitly initiated by the Matrix user)
|
||||
manual:
|
||||
# Action for private portals which will never be shared with other Matrix users.
|
||||
private: nothing
|
||||
# Action for portals with a relay user configured.
|
||||
relayed: nothing
|
||||
# Action for portals which may be shared, but don't currently have any other Matrix users.
|
||||
shared_no_users: nothing
|
||||
# Action for portals which have other logged-in Matrix users.
|
||||
shared_has_users: nothing
|
||||
# Settings for credentials being invalidated (initiated by the remote network, possibly through user action).
|
||||
# Keys have the same meanings as in the manual section.
|
||||
bad_credentials:
|
||||
private: nothing
|
||||
relayed: nothing
|
||||
shared_no_users: nothing
|
||||
shared_has_users: nothing
|
||||
|
||||
# Settings for relay mode
|
||||
relay:
|
||||
# Whether relay mode should be allowed. If allowed, the set-relay command can be used to turn any
|
||||
# authenticated user into a relaybot for that chat.
|
||||
enabled: false
|
||||
# Should only admins be allowed to set themselves as relay users?
|
||||
# If true, non-admins can only set users listed in default_relays as relays in a room.
|
||||
admin_only: true
|
||||
# List of user login IDs which anyone can set as a relay, as long as the relay user is in the room.
|
||||
default_relays: []
|
||||
# The formats to use when sending messages via the relaybot.
|
||||
# Available variables:
|
||||
# .Sender.UserID - The Matrix user ID of the sender.
|
||||
# .Sender.Displayname - The display name of the sender (if set).
|
||||
# .Sender.RequiresDisambiguation - Whether the sender's name may be confused with the name of another user in the room.
|
||||
# .Sender.DisambiguatedName - The disambiguated name of the sender. This will be the displayname if set,
|
||||
# plus the user ID in parentheses if the displayname is not unique.
|
||||
# If the displayname is not set, this is just the user ID.
|
||||
# .Message - The `formatted_body` field of the message.
|
||||
# .Caption - The `formatted_body` field of the message, if it's a caption. Otherwise an empty string.
|
||||
# .FileName - The name of the file being sent.
|
||||
message_formats:
|
||||
m.text: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b>: {{ .Message }}{% endraw %}"
|
||||
m.notice: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b>: {{ .Message }}{% endraw %}"
|
||||
m.emote: "{% raw %}* <b>{{ .Sender.DisambiguatedName }}</b> {{ .Message }}{% endraw %}"
|
||||
m.file: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a file{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
|
||||
m.image: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent an image{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
|
||||
m.audio: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent an audio file{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
|
||||
m.video: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a video{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
|
||||
m.location: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a location{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
|
||||
# For networks that support per-message displaynames (i.e. Slack and Discord), the template for those names.
|
||||
# This has all the Sender variables available under message_formats (but without the .Sender prefix).
|
||||
# Note that you need to manually remove the displayname from message_formats above.
|
||||
displayname_format: "{% raw %}{{ .DisambiguatedName }}{% endraw %}"
|
||||
|
||||
# Permissions for using the bridge.
|
||||
# Permitted values:
|
||||
# user - Use the bridge with puppeting.
|
||||
# admin - Use and administrate the bridge.
|
||||
# relay - Talk through the relaybot (if enabled), no access otherwise
|
||||
# commands - Access to use commands in the bridge, but not login.
|
||||
# user - Access to use the bridge with puppeting.
|
||||
# admin - Full access, user level with some additional administration tools.
|
||||
# Permitted keys:
|
||||
# * - All Matrix users
|
||||
# domain - All users on that homeserver
|
||||
# mxid - Specific user
|
||||
permissions: {{ matrix_mautrix_twitter_bridge_permissions|to_json }}
|
||||
permissions: {{ matrix_mautrix_twitter_bridge_permissions | to_json }}
|
||||
|
||||
# Config for the bridge's database.
|
||||
database:
|
||||
# The database type. "sqlite3-fk-wal" and "postgres" are supported.
|
||||
type: postgres
|
||||
# The database URI.
|
||||
# SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.
|
||||
# https://github.com/mattn/go-sqlite3#connection-string
|
||||
# Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
|
||||
# To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
|
||||
uri: {{ matrix_mautrix_twitter_database_uri | to_json }}
|
||||
# Maximum number of connections.
|
||||
max_open_conns: 5
|
||||
max_idle_conns: 1
|
||||
# Maximum connection idle time and lifetime before they're closed. Disabled if null.
|
||||
# Parsed with https://pkg.go.dev/time#ParseDuration
|
||||
max_conn_idle_time: null
|
||||
max_conn_lifetime: null
|
||||
|
||||
# Python logging configuration.
|
||||
# Homeserver details.
|
||||
homeserver:
|
||||
# The address that this appservice can use to connect to the homeserver.
|
||||
# Local addresses without HTTPS are generally recommended when the bridge is running on the same machine,
|
||||
# but https also works if they run on different machines.
|
||||
address: {{ matrix_mautrix_twitter_homeserver_address | to_json }}
|
||||
# The domain of the homeserver (also known as server_name, used for MXIDs, etc).
|
||||
domain: {{ matrix_mautrix_twitter_homeserver_domain | to_json }}
|
||||
|
||||
# What software is the homeserver running?
|
||||
# Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
|
||||
software: standard
|
||||
# The URL to push real-time bridge status to.
|
||||
# If set, the bridge will make POST requests to this URL whenever a user's remote network connection state changes.
|
||||
# The bridge will use the appservice as_token to authorize requests.
|
||||
status_endpoint:
|
||||
# Endpoint for reporting per-message status.
|
||||
# If set, the bridge will make POST requests to this URL when processing a message from Matrix.
|
||||
# It will make one request when receiving the message (step BRIDGE), one after decrypting if applicable
|
||||
# (step DECRYPTED) and one after sending to the remote network (step REMOTE). Errors will also be reported.
|
||||
# The bridge will use the appservice as_token to authorize requests.
|
||||
message_send_checkpoint_endpoint:
|
||||
# Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
|
||||
async_media: false
|
||||
|
||||
# Should the bridge use a websocket for connecting to the homeserver?
|
||||
# The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
|
||||
# mautrix-asmux (deprecated), and hungryserv (proprietary).
|
||||
websocket: false
|
||||
# How often should the websocket be pinged? Pinging will be disabled if this is zero.
|
||||
ping_interval_seconds: 0
|
||||
|
||||
# Application service host/registration related details.
|
||||
# Changing these values requires regeneration of the registration (except when noted otherwise)
|
||||
appservice:
|
||||
# The address that the homeserver can use to connect to this appservice.
|
||||
# Like the homeserver address, a local non-https address is recommended when the bridge is on the same machine.
|
||||
# If the bridge is elsewhere, you must secure the connection yourself (e.g. with https or wireguard)
|
||||
# If you want to use https, you need to use a reverse proxy. The bridge does not have TLS support built in.
|
||||
address: {{ matrix_mautrix_twitter_appservice_address | to_json }}
|
||||
# A public address that external services can use to reach this appservice.
|
||||
# This is only needed for things like public media. A reverse proxy is generally necessary when using this field.
|
||||
# This value doesn't affect the registration file.
|
||||
public_address: {{ matrix_mautrix_twitter_appservice_public_address | to_json }}
|
||||
|
||||
# The hostname and port where this appservice should listen.
|
||||
# For Docker, you generally have to change the hostname to 0.0.0.0.
|
||||
hostname: 0.0.0.0
|
||||
port: 29327
|
||||
|
||||
# The unique ID of this appservice.
|
||||
id: twitter
|
||||
# Appservice bot details.
|
||||
bot:
|
||||
# Username of the appservice bot.
|
||||
username: {{ matrix_mautrix_twitter_appservice_bot_username | to_json }}
|
||||
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
|
||||
# to leave display name/avatar as-is.
|
||||
displayname: {{ matrix_mautrix_twitter_appservice_bot_displayname | to_json }}
|
||||
avatar: {{ matrix_mautrix_twitter_appservice_bot_avatar | to_json }}
|
||||
|
||||
# Whether to receive ephemeral events via appservice transactions.
|
||||
ephemeral_events: true
|
||||
# Should incoming events be handled asynchronously?
|
||||
# This may be necessary for large public instances with lots of messages going through.
|
||||
# However, messages will not be guaranteed to be bridged in the same order they were sent in.
|
||||
# This value doesn't affect the registration file.
|
||||
async_transactions: false
|
||||
# Whether to use MSC4190 instead of appservice login to create the bridge bot device.
|
||||
# Requires the homeserver to support MSC4190 and the device masquerading parts of MSC3202.
|
||||
# Only relevant when using end-to-bridge encryption, required when using encryption with next-gen auth (MSC3861).
|
||||
msc4190: false
|
||||
|
||||
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
|
||||
as_token: {{ matrix_mautrix_twitter_appservice_token | to_json }}
|
||||
hs_token: {{ matrix_mautrix_twitter_homeserver_token | to_json }}
|
||||
|
||||
# Localpart template of MXIDs for remote users.
|
||||
# {% raw %}{{.}}{% endraw %} is replaced with the internal ID of the user.
|
||||
username_template: "{% raw %}twitter_{{.}}{% endraw %}"
|
||||
|
||||
# Config options that affect the Matrix connector of the bridge.
|
||||
matrix:
|
||||
# Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
|
||||
message_status_events: false
|
||||
# Whether the bridge should send a read receipt after successfully bridging a message.
|
||||
delivery_receipts: false
|
||||
# Whether the bridge should send error notices via m.notice events when a message fails to bridge.
|
||||
message_error_notices: true
|
||||
# Whether the bridge should update the m.direct account data event when double puppeting is enabled.
|
||||
sync_direct_chat_list: true
|
||||
# Whether created rooms should have federation enabled. If false, created portal rooms
|
||||
# will never be federated. Changing this option requires recreating rooms.
|
||||
federate_rooms: {{ matrix_mautrix_twitter_matrix_federate_rooms | to_json }}
|
||||
# The threshold as bytes after which the bridge should roundtrip uploads via the disk
|
||||
# rather than keeping the whole file in memory.
|
||||
upload_file_threshold: 5242880
|
||||
|
||||
# Segment-compatible analytics endpoint for tracking some events, like provisioning API login and encryption errors.
|
||||
analytics:
|
||||
# API key to send with tracking requests. Tracking is disabled if this is null.
|
||||
token: null
|
||||
# Address to send tracking requests to.
|
||||
url: https://api.segment.io/v1/track
|
||||
# Optional user ID for tracking events. If null, defaults to using Matrix user ID.
|
||||
user_id: null
|
||||
|
||||
# Settings for provisioning API
|
||||
provisioning:
|
||||
# Prefix for the provisioning API paths.
|
||||
prefix: /_matrix/provision
|
||||
# Shared secret for authentication. If set to "generate" or null, a random secret will be generated,
|
||||
# or if set to "disable", the provisioning API will be disabled.
|
||||
shared_secret: {{ matrix_mautrix_twitter_provisioning_shared_secret | to_json }}
|
||||
# Whether to allow provisioning API requests to be authed using Matrix access tokens.
|
||||
# This follows the same rules as double puppeting to determine which server to contact to check the token,
|
||||
# which means that by default, it only works for users on the same server as the bridge.
|
||||
allow_matrix_auth: true
|
||||
# Enable debug API at /debug with provisioning authentication.
|
||||
debug_endpoints: false
|
||||
|
||||
# Some networks require publicly accessible media download links (e.g. for user avatars when using Discord webhooks).
|
||||
# These settings control whether the bridge will provide such public media access.
|
||||
public_media:
|
||||
# Should public media be enabled at all?
|
||||
# The public_address field under the appservice section MUST be set when enabling public media.
|
||||
enabled: false
|
||||
# A key for signing public media URLs.
|
||||
# If set to "generate", a random key will be generated.
|
||||
signing_key: ""
|
||||
# Number of seconds that public media URLs are valid for.
|
||||
# If set to 0, URLs will never expire.
|
||||
expiry: 0
|
||||
# Length of hash to use for public media URLs. Must be between 0 and 32.
|
||||
hash_length: 32
|
||||
|
||||
# Settings for converting remote media to custom mxc:// URIs instead of reuploading.
|
||||
# More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html
|
||||
direct_media:
|
||||
# Should custom mxc:// URIs be used instead of reuploading media?
|
||||
enabled: false
|
||||
# The server name to use for the custom mxc:// URIs.
|
||||
# This server name will effectively be a real Matrix server, it just won't implement anything other than media.
|
||||
# You must either set up .well-known delegation from this domain to the bridge, or proxy the domain directly to the bridge.
|
||||
server_name: discord-media.example.com
|
||||
# Optionally a custom .well-known response. This defaults to `server_name:443`
|
||||
well_known_response:
|
||||
# Optionally specify a custom prefix for the media ID part of the MXC URI.
|
||||
media_id_prefix:
|
||||
# If the remote network supports media downloads over HTTP, then the bridge will use MSC3860/MSC3916
|
||||
# media download redirects if the requester supports it. Optionally, you can force redirects
|
||||
# and not allow proxying at all by setting this to false.
|
||||
# This option does nothing if the remote network does not support media downloads over HTTP.
|
||||
allow_proxy: true
|
||||
# Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file.
|
||||
# This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them.
|
||||
server_key: ""
|
||||
|
||||
# Settings for backfilling messages.
|
||||
# Note that the exact way settings are applied depends on the network connector.
|
||||
# See https://docs.mau.fi/bridges/general/backfill.html for more details.
|
||||
backfill:
|
||||
# Whether to do backfilling at all.
|
||||
enabled: {{ matrix_mautrix_twitter_backfill_enabled | to_json }}
|
||||
# Maximum number of messages to backfill in empty rooms.
|
||||
max_initial_messages: {{ matrix_mautrix_twitter_backfill_max_initial_messages | to_json }}
|
||||
# Maximum number of missed messages to backfill after bridge restarts.
|
||||
max_catchup_messages: {{ matrix_mautrix_twitter_backfill_max_catchup_messages | to_json }}
|
||||
# If a backfilled chat is older than this number of hours,
|
||||
# mark it as read even if it's unread on the remote network.
|
||||
unread_hours_threshold: 720
|
||||
# Settings for backfilling threads within other backfills.
|
||||
threads:
|
||||
# Maximum number of messages to backfill in a new thread.
|
||||
max_initial_messages: 50
|
||||
# Settings for the backwards backfill queue. This only applies when connecting to
|
||||
# Beeper as standard Matrix servers don't support inserting messages into history.
|
||||
queue:
|
||||
# Should the backfill queue be enabled?
|
||||
enabled: false
|
||||
# Number of messages to backfill in one batch.
|
||||
batch_size: 100
|
||||
# Delay between batches in seconds.
|
||||
batch_delay: 20
|
||||
# Maximum number of batches to backfill per portal.
|
||||
# If set to -1, all available messages will be backfilled.
|
||||
max_batches: -1
|
||||
# Optional network-specific overrides for max batches.
|
||||
# Interpretation of this field depends on the network connector.
|
||||
max_batches_override: {}
|
||||
|
||||
# Settings for enabling double puppeting
|
||||
double_puppet:
|
||||
# Servers to always allow double puppeting from.
|
||||
# This is only for other servers and should NOT contain the server the bridge is on.
|
||||
servers: {}
|
||||
# Whether to allow client API URL discovery for other servers. When using this option,
|
||||
# users on other servers can use double puppeting even if their server URLs aren't
|
||||
# explicitly added to the servers map above.
|
||||
allow_discovery: false
|
||||
# Shared secrets for automatic double puppeting.
|
||||
# See https://docs.mau.fi/bridges/general/double-puppeting.html for instructions.
|
||||
secrets: {{ matrix_mautrix_twitter_double_puppet_secrets | to_json }}
|
||||
|
||||
# End-to-bridge encryption support options.
|
||||
#
|
||||
# See section 16.7.2 of the Python documentation for more info:
|
||||
# https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
|
||||
# See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
|
||||
encryption:
|
||||
# Whether to enable encryption at all. If false, the bridge will not function in encrypted rooms.
|
||||
allow: {{ matrix_mautrix_twitter_bridge_encryption_allow | to_json }}
|
||||
# Whether to force-enable encryption in all bridged rooms.
|
||||
default: {{ matrix_mautrix_twitter_bridge_encryption_default | to_json }}
|
||||
# Whether to require all messages to be encrypted and drop any unencrypted messages.
|
||||
require: {{ matrix_mautrix_twitter_bridge_encryption_require | to_json }}
|
||||
# Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
|
||||
# This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
|
||||
appservice: {{ matrix_mautrix_twitter_bridge_encryption_appservice | to_json }}
|
||||
# Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
|
||||
# You must use a client that supports requesting keys from other users to use this feature.
|
||||
allow_key_sharing: {{ matrix_mautrix_twitter_bridge_encryption_key_sharing_allow | to_json }}
|
||||
# Pickle key for encrypting encryption keys in the bridge database.
|
||||
# If set to generate, a random key will be generated.
|
||||
pickle_key: {{ matrix_mautrix_twitter_bridge_encryption_pickle_key | to_json }}
|
||||
# Options for deleting megolm sessions from the bridge.
|
||||
delete_keys:
|
||||
# Beeper-specific: delete outbound sessions when hungryserv confirms
|
||||
# that the user has uploaded the key to key backup.
|
||||
delete_outbound_on_ack: false
|
||||
# Don't store outbound sessions in the inbound table.
|
||||
dont_store_outbound: false
|
||||
# Ratchet megolm sessions forward after decrypting messages.
|
||||
ratchet_on_decrypt: false
|
||||
# Delete fully used keys (index >= max_messages) after decrypting messages.
|
||||
delete_fully_used_on_decrypt: false
|
||||
# Delete previous megolm sessions from same device when receiving a new one.
|
||||
delete_prev_on_new_session: false
|
||||
# Delete megolm sessions received from a device when the device is deleted.
|
||||
delete_on_device_delete: false
|
||||
# Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
|
||||
periodically_delete_expired: false
|
||||
# Delete inbound megolm sessions that don't have the received_at field used for
|
||||
# automatic ratcheting and expired session deletion. This is meant as a migration
|
||||
# to delete old keys prior to the bridge update.
|
||||
delete_outdated_inbound: false
|
||||
# What level of device verification should be required from users?
|
||||
#
|
||||
# Valid levels:
|
||||
# unverified - Send keys to all device in the room.
|
||||
# cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
|
||||
# cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
|
||||
# cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
|
||||
# Note that creating user signatures from the bridge bot is not currently possible.
|
||||
# verified - Require manual per-device verification
|
||||
# (currently only possible by modifying the `trust` column in the `crypto_device` database table).
|
||||
verification_levels:
|
||||
# Minimum level for which the bridge should send keys to when bridging messages from the remote network to Matrix.
|
||||
receive: unverified
|
||||
# Minimum level that the bridge should accept for incoming Matrix messages.
|
||||
send: unverified
|
||||
# Minimum level that the bridge should require for accepting key requests.
|
||||
share: cross-signed-tofu
|
||||
# Options for Megolm room key rotation. These options allow you to configure the m.room.encryption event content.
|
||||
# See https://spec.matrix.org/v1.10/client-server-api/#mroomencryption for more information about that event.
|
||||
rotation:
|
||||
# Enable custom Megolm room key rotation settings. Note that these
|
||||
# settings will only apply to rooms created after this option is set.
|
||||
enable_custom: false
|
||||
# The maximum number of milliseconds a session should be used
|
||||
# before changing it. The Matrix spec recommends 604800000 (a week)
|
||||
# as the default.
|
||||
milliseconds: 604800000
|
||||
# The maximum number of messages that should be sent with a given a
|
||||
# session before changing it. The Matrix spec recommends 100 as the
|
||||
# default.
|
||||
messages: 100
|
||||
# Disable rotating keys when a user's devices change?
|
||||
# You should not enable this option unless you understand all the implications.
|
||||
disable_device_change_key_rotation: false
|
||||
|
||||
# Logging config. See https://github.com/tulir/zeroconfig for details.
|
||||
logging:
|
||||
version: 1
|
||||
formatters:
|
||||
colored:
|
||||
(): mautrix_twitter.util.ColorFormatter
|
||||
format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
|
||||
normal:
|
||||
format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
|
||||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: colored
|
||||
loggers:
|
||||
mau:
|
||||
level: {{ matrix_mautrix_twitter_logging_level|to_json }}
|
||||
aiohttp:
|
||||
level: {{ matrix_mautrix_twitter_logging_level|to_json }}
|
||||
root:
|
||||
level: {{ matrix_mautrix_twitter_logging_level|to_json }}
|
||||
handlers: [console]
|
||||
min_level: {{ matrix_mautrix_twitter_logging_level | to_json }}
|
||||
writers:
|
||||
- type: stdout
|
||||
format: pretty-colored
|
||||
|
||||
@@ -30,7 +30,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_mautrix_twitter_docker_image }} \
|
||||
python3 -m mautrix_twitter -c /config/config.yaml --no-update
|
||||
/usr/bin/mautrix-twitter -c /config/config.yaml -r /config/registration.yaml --no-update
|
||||
|
||||
{% for network in matrix_mautrix_twitter_container_additional_networks %}
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-twitter
|
||||
|
||||
@@ -9,7 +9,7 @@ matrix_mautrix_whatsapp_container_image_self_build_repo: "https://mau.dev/mautri
|
||||
matrix_mautrix_whatsapp_container_image_self_build_branch: "{{ 'master' if matrix_mautrix_whatsapp_version == 'latest' else matrix_mautrix_whatsapp_version }}"
|
||||
|
||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/whatsapp
|
||||
matrix_mautrix_whatsapp_version: v0.11.0
|
||||
matrix_mautrix_whatsapp_version: v0.11.2
|
||||
|
||||
# See: https://mau.dev/mautrix/whatsapp/container_registry
|
||||
matrix_mautrix_whatsapp_docker_image: "{{ matrix_mautrix_whatsapp_docker_image_name_prefix }}mautrix/whatsapp:{{ matrix_mautrix_whatsapp_version }}"
|
||||
@@ -82,7 +82,7 @@ matrix_mautrix_whatsapp_homeserver_token: ''
|
||||
matrix_mautrix_whatsapp_appservice_bot_username: whatsappbot
|
||||
|
||||
# Minimum severity of journal log messages.
|
||||
# Options: debug, info, warn, error, fatal
|
||||
# Options: trace, debug, info, warn, error, fatal
|
||||
matrix_mautrix_whatsapp_logging_level: 'warn'
|
||||
|
||||
# Whether or not created rooms should have federation enabled.
|
||||
|
||||
@@ -384,7 +384,7 @@ direct_media:
|
||||
allow_proxy: true
|
||||
# Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file.
|
||||
# This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them.
|
||||
server_key: generate
|
||||
server_key: ""
|
||||
|
||||
# Settings for backfilling messages.
|
||||
# Note that the exact way settings are applied depends on the network connector.
|
||||
|
||||
@@ -33,14 +33,14 @@ matrix_mx_puppet_discord_appservice_address: 'http://matrix-mx-puppet-discord:{{
|
||||
|
||||
matrix_mx_puppet_discord_bridge_mediaUrl: "{{ matrix_homeserver_url }}" # noqa var-naming
|
||||
|
||||
# "@user:example.com" to allow a specific user
|
||||
# "@alice:example.com" to allow a specific user
|
||||
# "@.*:example.com" to allow users on a specific homeserver
|
||||
# "@.*" to allow anyone
|
||||
matrix_mx_puppet_discord_provisioning_whitelist:
|
||||
- "@.*:{{ matrix_domain | regex_escape }}"
|
||||
|
||||
# Leave empty to disable blacklist
|
||||
# "@user:example.com" to disallow a specific user
|
||||
# "@bob:example.com" to disallow a specific user
|
||||
# "@.*:example.com" to disallow users on a specific homeserver
|
||||
matrix_mx_puppet_discord_provisioning_blacklist: []
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ provisioning:
|
||||
# Regex of Matrix IDs allowed to use the puppet bridge
|
||||
whitelist: {{ matrix_mx_puppet_discord_provisioning_whitelist|to_json }}
|
||||
# Allow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@alice:example\\.com"
|
||||
# Allow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
# Allow anyone
|
||||
@@ -39,7 +39,7 @@ provisioning:
|
||||
# Regex of Matrix IDs forbidden from using the puppet bridge
|
||||
#blacklist:
|
||||
# Disallow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@bob:example\\.com"
|
||||
# Disallow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
blacklist: {{ matrix_mx_puppet_discord_provisioning_blacklist|to_json }}
|
||||
|
||||
@@ -29,14 +29,14 @@ matrix_mx_puppet_groupme_homeserver_address: ""
|
||||
matrix_mx_puppet_groupme_homeserver_domain: '{{ matrix_domain }}'
|
||||
matrix_mx_puppet_groupme_appservice_address: 'http://matrix-mx-puppet-groupme:{{ matrix_mx_puppet_groupme_appservice_port }}'
|
||||
|
||||
# "@user:example.com" to allow a specific user
|
||||
# "@alice:example.com" to allow a specific user
|
||||
# "@.*:example.com" to allow users on a specific homeserver
|
||||
# "@.*" to allow anyone
|
||||
matrix_mx_puppet_groupme_provisioning_whitelist:
|
||||
- "@.*:{{ matrix_domain | regex_escape }}"
|
||||
|
||||
# Leave empty to disable blacklist
|
||||
# "@user:example.com" to disallow a specific user
|
||||
# "@bob:example.com" to disallow a specific user
|
||||
# "@.*:example.com" to disallow users on a specific homeserver
|
||||
matrix_mx_puppet_groupme_provisioning_blacklist: []
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ provisioning:
|
||||
# Regex of Matrix IDs allowed to use the puppet bridge
|
||||
whitelist: {{ matrix_mx_puppet_groupme_provisioning_whitelist|to_json }}
|
||||
# Allow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@alice:example\\.com"
|
||||
# Allow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
# Allow anyone
|
||||
@@ -39,7 +39,7 @@ provisioning:
|
||||
# Regex of Matrix IDs forbidden from using the puppet bridge
|
||||
#blacklist:
|
||||
# Disallow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@bob:example\\.com"
|
||||
# Disallow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
blacklist: {{ matrix_mx_puppet_groupme_provisioning_blacklist|to_json }}
|
||||
|
||||
@@ -24,14 +24,14 @@ matrix_mx_puppet_instagram_homeserver_address: ""
|
||||
matrix_mx_puppet_instagram_homeserver_domain: '{{ matrix_domain }}'
|
||||
matrix_mx_puppet_instagram_appservice_address: 'http://matrix-mx-puppet-instagram:{{ matrix_mx_puppet_instagram_appservice_port }}'
|
||||
|
||||
# "@user:example.com" to allow a specific user
|
||||
# "@alice:example.com" to allow a specific user
|
||||
# "@.*:example.com" to allow users on a specific homeserver
|
||||
# "@.*" to allow anyone
|
||||
matrix_mx_puppet_instagram_provisioning_whitelist:
|
||||
- "@.*:{{ matrix_domain | regex_escape }}"
|
||||
|
||||
# Leave empty to disable blacklist
|
||||
# "@user:example.com" to disallow a specific user
|
||||
# "@bob:example.com" to disallow a specific user
|
||||
# "@.*:example.com" to disallow users on a specific homeserver
|
||||
matrix_mx_puppet_instagram_provisioning_blacklist: []
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ provisioning:
|
||||
# Regex of Matrix IDs allowed to use the puppet bridge
|
||||
whitelist: {{ matrix_mx_puppet_instagram_provisioning_whitelist|to_json }}
|
||||
# Allow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@alice:example\\.com"
|
||||
# Allow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
# Allow anyone
|
||||
@@ -32,7 +32,7 @@ provisioning:
|
||||
# Regex of Matrix IDs forbidden from using the puppet bridge
|
||||
#blacklist:
|
||||
# Disallow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@bob:example\\.com"
|
||||
# Disallow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
blacklist: {{ matrix_mx_puppet_instagram_provisioning_blacklist|to_json }}
|
||||
|
||||
@@ -42,14 +42,14 @@ matrix_mx_puppet_slack_oauth_enabled: true
|
||||
matrix_mx_puppet_slack_oauth_redirect_path: "{{ matrix_mx_puppet_slack_path_prefix }}"
|
||||
matrix_mx_puppet_slack_oauth_redirect_uri: '{{ matrix_mx_puppet_slack_scheme }}://{{ matrix_mx_puppet_slack_hostname }}{{ matrix_mx_puppet_slack_oauth_redirect_path }}'
|
||||
|
||||
# "@user:example.com" to allow a specific user
|
||||
# "@alice:example.com" to allow a specific user
|
||||
# "@.*:example.com" to allow users on a specific homeserver
|
||||
# "@.*" to allow anyone
|
||||
matrix_mx_puppet_slack_provisioning_whitelist:
|
||||
- "@.*:{{ matrix_domain | regex_escape }}"
|
||||
|
||||
# Leave empty to disable blacklist
|
||||
# "@user:example.com" to disallow a specific user
|
||||
# "@bob:example.com" to disallow a specific user
|
||||
# "@.*:example.com" to disallow users on a specific homeserver
|
||||
matrix_mx_puppet_slack_provisioning_blacklist: []
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ provisioning:
|
||||
# Regex of Matrix IDs allowed to use the puppet bridge
|
||||
whitelist: {{ matrix_mx_puppet_slack_provisioning_whitelist|to_json }}
|
||||
# Allow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@alice:example\\.com"
|
||||
# Allow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
# Allow anyone
|
||||
@@ -46,7 +46,7 @@ provisioning:
|
||||
# Regex of Matrix IDs forbidden from using the puppet bridge
|
||||
#blacklist:
|
||||
# Disallow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@bob:example\\.com"
|
||||
# Disallow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
blacklist: {{ matrix_mx_puppet_slack_provisioning_blacklist|to_json }}
|
||||
|
||||
@@ -30,14 +30,14 @@ matrix_mx_puppet_steam_homeserver_address: ""
|
||||
matrix_mx_puppet_steam_homeserver_domain: '{{ matrix_domain }}'
|
||||
matrix_mx_puppet_steam_appservice_address: 'http://matrix-mx-puppet-steam:{{ matrix_mx_puppet_steam_appservice_port }}'
|
||||
|
||||
# "@user:example.com" to allow a specific user
|
||||
# "@alice:example.com" to allow a specific user
|
||||
# "@.*:example.com" to allow users on a specific homeserver
|
||||
# "@.*" to allow anyone
|
||||
matrix_mx_puppet_steam_provisioning_whitelist:
|
||||
- "@.*:{{ matrix_domain | regex_escape }}"
|
||||
|
||||
# Leave empty to disable blacklist
|
||||
# "@user:example.com" to disallow a specific user
|
||||
# "@bob:example.com" to disallow a specific user
|
||||
# "@.*:example.com" to disallow users on a specific homeserver
|
||||
matrix_mx_puppet_steam_provisioning_blacklist: []
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ provisioning:
|
||||
# Regex of Matrix IDs allowed to use the puppet bridge
|
||||
whitelist: {{ matrix_mx_puppet_steam_provisioning_whitelist|to_json }}
|
||||
# Allow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@alice:example\\.com"
|
||||
# Allow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
# Allow anyone
|
||||
@@ -39,7 +39,7 @@ provisioning:
|
||||
# Regex of Matrix IDs forbidden from using the puppet bridge
|
||||
#blacklist:
|
||||
# Disallow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@bob:example\\.com"
|
||||
# Disallow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
blacklist: {{ matrix_mx_puppet_steam_provisioning_blacklist|to_json }}
|
||||
|
||||
@@ -42,14 +42,14 @@ matrix_mx_puppet_twitter_environment: ''
|
||||
matrix_mx_puppet_twitter_server_path: "{{ matrix_mx_puppet_twitter_path_prefix }}"
|
||||
matrix_mx_puppet_twitter_server_url: '{{ matrix_homeserver_url }}{{ matrix_mx_puppet_twitter_server_path }}'
|
||||
|
||||
# "@user:example.com" to allow a specific user
|
||||
# "@alice:example.com" to allow a specific user
|
||||
# "@.*:example.com" to allow users on a specific homeserver
|
||||
# "@.*" to allow anyone
|
||||
matrix_mx_puppet_twitter_provisioning_whitelist:
|
||||
- "@.*:{{ matrix_domain | regex_escape }}"
|
||||
|
||||
# Leave empty to disable blacklist
|
||||
# "@user:example.com" to disallow a specific user
|
||||
# "@bob:example.com" to disallow a specific user
|
||||
# "@.*:example.com" to disallow users on a specific homeserver
|
||||
matrix_mx_puppet_twitter_provisioning_blacklist: []
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ provisioning:
|
||||
# Regex of Matrix IDs allowed to use the puppet bridge
|
||||
whitelist: {{ matrix_mx_puppet_twitter_provisioning_whitelist|to_json }}
|
||||
# Allow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@alice:example\\.com"
|
||||
# Allow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
# Allow anyone
|
||||
@@ -42,7 +42,7 @@ provisioning:
|
||||
# Regex of Matrix IDs forbidden from using the puppet bridge
|
||||
#blacklist:
|
||||
# Disallow a specific user
|
||||
#- "@user:example\\.com"
|
||||
#- "@bob:example\\.com"
|
||||
# Disallow users on a specific homeserver
|
||||
#- "@.*:example\\.com"
|
||||
blacklist: {{ matrix_mx_puppet_twitter_provisioning_blacklist|to_json }}
|
||||
|
||||
179
roles/custom/matrix-bridge-postmoogle/defaults/main.yml
Normal file
179
roles/custom/matrix-bridge-postmoogle/defaults/main.yml
Normal file
@@ -0,0 +1,179 @@
|
||||
---
|
||||
# postmoogle is an email to Matrix bridge using its bot user
|
||||
# Project source code URL: https://github.com/etkecc/postmoogle
|
||||
|
||||
matrix_postmoogle_enabled: true
|
||||
|
||||
matrix_postmoogle_container_image_self_build: false
|
||||
matrix_postmoogle_docker_repo: "https://github.com/etkecc/postmoogle.git"
|
||||
matrix_postmoogle_docker_repo_version: "{{ 'main' if matrix_postmoogle_version == 'latest' else matrix_postmoogle_version }}"
|
||||
matrix_postmoogle_docker_src_files_path: "{{ matrix_base_data_path }}/postmoogle/docker-src"
|
||||
|
||||
# renovate: datasource=docker depName=ghcr.io/etkecc/postmoogle
|
||||
matrix_postmoogle_version: v0.9.24
|
||||
matrix_postmoogle_docker_image: "{{ matrix_postmoogle_docker_image_name_prefix }}etkecc/postmoogle:{{ matrix_postmoogle_version }}"
|
||||
matrix_postmoogle_docker_image_name_prefix: "{{ 'localhost/' if matrix_postmoogle_container_image_self_build else 'ghcr.io/' }}"
|
||||
matrix_postmoogle_docker_image_force_pull: "{{ matrix_postmoogle_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_postmoogle_base_path: "{{ matrix_base_data_path }}/postmoogle"
|
||||
matrix_postmoogle_config_path: "{{ matrix_postmoogle_base_path }}/config"
|
||||
matrix_postmoogle_data_path: "{{ matrix_postmoogle_base_path }}/data"
|
||||
|
||||
matrix_postmoogle_container_network: ""
|
||||
|
||||
matrix_postmoogle_container_additional_networks: "{{ matrix_postmoogle_container_additional_networks_auto + matrix_postmoogle_container_additional_networks_custom }}"
|
||||
matrix_postmoogle_container_additional_networks_auto: []
|
||||
matrix_postmoogle_container_additional_networks_custom: []
|
||||
|
||||
# A list of extra arguments to pass to the container
|
||||
matrix_postmoogle_container_extra_arguments: []
|
||||
|
||||
# List of systemd services that matrix-postmoogle.service depends on
|
||||
matrix_postmoogle_systemd_required_services_list: "{{ matrix_postmoogle_systemd_required_services_list_default + matrix_postmoogle_systemd_required_services_list_auto + matrix_postmoogle_systemd_required_services_list_custom }}"
|
||||
matrix_postmoogle_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
|
||||
matrix_postmoogle_systemd_required_services_list_auto: []
|
||||
matrix_postmoogle_systemd_required_services_list_custom: []
|
||||
|
||||
# List of systemd services that matrix-postmoogle.service wants
|
||||
matrix_postmoogle_systemd_wanted_services_list: []
|
||||
|
||||
# Database-related configuration fields.
|
||||
#
|
||||
# To use SQLite, stick to these defaults.
|
||||
#
|
||||
# To use Postgres:
|
||||
# - change the engine (`matrix_postmoogle_database_engine: 'postgres'`)
|
||||
# - adjust your database credentials via the `matrix_postmoogle_database_*` variables
|
||||
matrix_postmoogle_database_engine: 'sqlite'
|
||||
|
||||
matrix_postmoogle_sqlite_database_path_local: "{{ matrix_postmoogle_data_path }}/bot.db"
|
||||
matrix_postmoogle_sqlite_database_path_in_container: "/data/bot.db"
|
||||
|
||||
matrix_postmoogle_database_username: 'postmoogle'
|
||||
matrix_postmoogle_database_password: 'some-password'
|
||||
matrix_postmoogle_database_hostname: ''
|
||||
matrix_postmoogle_database_port: 5432
|
||||
matrix_postmoogle_database_name: 'postmoogle'
|
||||
matrix_postmoogle_database_sslmode: disable
|
||||
|
||||
matrix_postmoogle_database_connection_string: 'postgres://{{ matrix_postmoogle_database_username }}:{{ matrix_postmoogle_database_password }}@{{ matrix_postmoogle_database_hostname }}:{{ matrix_postmoogle_database_port }}/{{ matrix_postmoogle_database_name }}?sslmode={{ matrix_postmoogle_database_sslmode }}'
|
||||
|
||||
matrix_postmoogle_storage_database: "{{
|
||||
{
|
||||
'sqlite': matrix_postmoogle_sqlite_database_path_in_container,
|
||||
'postgres': matrix_postmoogle_database_connection_string,
|
||||
}[matrix_postmoogle_database_engine]
|
||||
}}"
|
||||
|
||||
matrix_postmoogle_database_dialect: "{{
|
||||
{
|
||||
'sqlite': 'sqlite3',
|
||||
'postgres': 'postgres',
|
||||
}[matrix_postmoogle_database_engine]
|
||||
}}"
|
||||
|
||||
|
||||
# The bot's username. This user needs to be created manually beforehand.
|
||||
# Also see `matrix_postmoogle_password` or `matrix_postmoogle_sharedsecret`
|
||||
matrix_postmoogle_login: "postmoogle"
|
||||
|
||||
# The password that the bot uses to authenticate.
|
||||
matrix_postmoogle_password: ''
|
||||
|
||||
# Alternative to password - shared secret requires matrix_postmoogle_login to be MXID
|
||||
matrix_postmoogle_sharedsecret: ''
|
||||
|
||||
matrix_postmoogle_homeserver: ""
|
||||
|
||||
# Command prefix
|
||||
matrix_postmoogle_prefix: '!pm'
|
||||
|
||||
# Max email size in megabytes, including attachments
|
||||
matrix_postmoogle_maxsize: '1024'
|
||||
|
||||
# Optional SMTP relay mode
|
||||
matrix_postmoogle_relay_host: ''
|
||||
matrix_postmoogle_relay_port: ''
|
||||
matrix_postmoogle_relay_username: ''
|
||||
matrix_postmoogle_relay_password: ''
|
||||
|
||||
# A list of admins
|
||||
# Example set of rules:
|
||||
# matrix_postmoogle_admins:
|
||||
# - '@alice:example.com'
|
||||
# - '@bob:example.com'
|
||||
# - '@bot.*:example.com'
|
||||
# - '@*:example.net'
|
||||
matrix_postmoogle_admins: "{{ [matrix_admin] if matrix_admin else [] }}"
|
||||
|
||||
# Sentry DSN. Deprecated, use matrix_postmoogle_monitoring_sentry_dsn
|
||||
matrix_postmoogle_sentry: ''
|
||||
|
||||
# Sentry integration
|
||||
matrix_postmoogle_monitoring_sentry_dsn: "{{ matrix_postmoogle_sentry }}"
|
||||
matrix_postmoogle_monitoring_sentry_rate: 20
|
||||
|
||||
# healthchecks.io integration
|
||||
matrix_postmoogle_monitoring_healthchecks_uuid: ''
|
||||
matrix_postmoogle_monitoring_healthchecks_duration: 60
|
||||
|
||||
# Log level
|
||||
matrix_postmoogle_loglevel: 'INFO'
|
||||
|
||||
# deprecated, use matrix_postmoogle_domains
|
||||
matrix_postmoogle_domain: "{{ matrix_server_fqn_matrix }}"
|
||||
|
||||
matrix_postmoogle_domains:
|
||||
- "{{ matrix_postmoogle_domain }}" # backward compatibility
|
||||
|
||||
# Password (passphrase) to encrypt account data
|
||||
matrix_postmoogle_data_secret: ""
|
||||
|
||||
# in-container ports
|
||||
matrix_postmoogle_port: '2525'
|
||||
matrix_postmoogle_tls_port: '25587'
|
||||
|
||||
# on-host ports
|
||||
matrix_postmoogle_smtp_host_bind_port: '25'
|
||||
matrix_postmoogle_submission_host_bind_port: '587'
|
||||
|
||||
### SSL
|
||||
## on-host SSL dir
|
||||
matrix_postmoogle_ssl_path: ""
|
||||
|
||||
## in-container SSL paths
|
||||
# matrix_postmoogle_tls_cert is the SSL certificates' certificates.
|
||||
# This var is likely set via group_vars/matrix_servers, so you don't need to set certs manually.
|
||||
# If you do need to set it manually, note that this is an in-container path.
|
||||
# To mount a certificates volumes into the container, use matrix_postmoogle_ssl_path
|
||||
# Example value: /ssl/live/{{ matrix_postmoogle_domain }}/fullchain.pem
|
||||
matrix_postmoogle_tls_cert: ""
|
||||
|
||||
# matrix_postmoogle_tls_key is the SSL certificates' keys.
|
||||
# This var is likely set via group_vars/matrix_servers, so you don't need to set keys manually.
|
||||
# If you do need to set it manually, note that this is an in-container path.
|
||||
# To mount a certificates volumes into the container, use matrix_postmoogle_ssl_path
|
||||
# Example value: /ssl/live/{{ matrix_postmoogle_domain }}/privkey.pem
|
||||
matrix_postmoogle_tls_key: ""
|
||||
|
||||
# Mandatory TLS, even on plain SMTP port
|
||||
matrix_postmoogle_tls_required: false
|
||||
|
||||
# trusted proxies
|
||||
matrix_postmoogle_proxies: []
|
||||
|
||||
# known forwarders
|
||||
matrix_postmoogle_mailboxes_forwarded: []
|
||||
|
||||
# reserved mailboxes
|
||||
matrix_postmoogle_mailboxes_reserved: []
|
||||
|
||||
# mailbox activation flow
|
||||
matrix_postmoogle_mailboxes_activation: none
|
||||
|
||||
# Additional environment variables to pass to the postmoogle container
|
||||
#
|
||||
# Example:
|
||||
# matrix_postmoogle_environment_variables_extension: |
|
||||
# postmoogle_TEXT_DONE=Done
|
||||
matrix_postmoogle_environment_variables_extension: ''
|
||||
@@ -2,19 +2,19 @@
|
||||
|
||||
- tags:
|
||||
- setup-all
|
||||
- setup-bot-postmoogle
|
||||
- setup-postmoogle
|
||||
- install-all
|
||||
- install-bot-postmoogle
|
||||
- install-postmoogle
|
||||
block:
|
||||
- when: matrix_bot_postmoogle_enabled | bool
|
||||
- when: matrix_postmoogle_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
|
||||
- when: matrix_bot_postmoogle_enabled | bool
|
||||
- when: matrix_postmoogle_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||
|
||||
- tags:
|
||||
- setup-all
|
||||
- setup-bot-postmoogle
|
||||
- setup-postmoogle
|
||||
block:
|
||||
- when: not matrix_bot_postmoogle_enabled | bool
|
||||
- when: not matrix_postmoogle_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||
119
roles/custom/matrix-bridge-postmoogle/tasks/setup_install.yml
Normal file
119
roles/custom/matrix-bridge-postmoogle/tasks/setup_install.yml
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
|
||||
# Check and remove the legacy systemd service (`matrix-bot-postmoogle.service`).
|
||||
# This role uses `matrix-postmoogle.service` now.
|
||||
# Related to: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3698
|
||||
|
||||
- name: Check if matrix-bot-postmoogle.service exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
|
||||
register: matrix_bot_postmoogle_service_stat
|
||||
|
||||
- name: Stop and remove legacy matrix-bot-postmoogle systemd service
|
||||
when: matrix_bot_postmoogle_service_stat.stat.exists | bool
|
||||
block:
|
||||
- name: Ensure legacy matrix-bot-postmoogle service is stopped
|
||||
ansible.builtin.service:
|
||||
name: matrix-bot-postmoogle
|
||||
state: stopped
|
||||
enabled: false
|
||||
failed_when: false
|
||||
|
||||
- name: Remove legacy matrix-bot-postmoogle service file
|
||||
ansible.builtin.file:
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
|
||||
state: absent
|
||||
|
||||
- when: "matrix_postmoogle_database_engine == 'postgres'"
|
||||
block:
|
||||
- name: Check if an SQLite database already exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_postmoogle_sqlite_database_path_local }}"
|
||||
register: matrix_postmoogle_sqlite_database_path_local_stat_result
|
||||
|
||||
- when: "matrix_postmoogle_sqlite_database_path_local_stat_result.stat.exists | bool"
|
||||
block:
|
||||
- ansible.builtin.include_role:
|
||||
name: galaxy/postgres
|
||||
tasks_from: migrate_db_to_postgres
|
||||
vars:
|
||||
postgres_db_migration_request:
|
||||
src: "{{ matrix_postmoogle_sqlite_database_path_local }}"
|
||||
dst: "{{ matrix_postmoogle_database_connection_string }}"
|
||||
caller: "{{ role_path | basename }}"
|
||||
engine_variable_name: 'matrix_postmoogle_database_engine'
|
||||
engine_old: 'sqlite'
|
||||
systemd_services_to_stop: ['matrix-postmoogle.service']
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_postmoogle_requires_restart: true
|
||||
|
||||
- name: Ensure postmoogle paths exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- {path: "{{ matrix_postmoogle_config_path }}", when: true}
|
||||
- {path: "{{ matrix_postmoogle_data_path }}", when: true}
|
||||
- {path: "{{ matrix_postmoogle_docker_src_files_path }}", when: matrix_postmoogle_container_image_self_build}
|
||||
when: "item.when | bool"
|
||||
|
||||
- name: Ensure postmoogle environment variables file created
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/env.j2"
|
||||
dest: "{{ matrix_postmoogle_config_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
mode: 0640
|
||||
|
||||
- name: Ensure postmoogle image is pulled
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_postmoogle_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_postmoogle_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_postmoogle_docker_image_force_pull }}"
|
||||
when: "not matrix_postmoogle_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
|
||||
|
||||
- name: Ensure postmoogle repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_postmoogle_docker_repo }}"
|
||||
version: "{{ matrix_postmoogle_docker_repo_version }}"
|
||||
dest: "{{ matrix_postmoogle_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
become: true
|
||||
become_user: "{{ matrix_user_username }}"
|
||||
register: matrix_postmoogle_git_pull_results
|
||||
when: "matrix_postmoogle_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure postmoogle image is built
|
||||
community.docker.docker_image:
|
||||
name: "{{ matrix_postmoogle_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_postmoogle_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_postmoogle_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_postmoogle_docker_src_files_path }}"
|
||||
pull: true
|
||||
when: "matrix_postmoogle_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure postmoogle container network is created
|
||||
community.general.docker_network:
|
||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||
name: "{{ matrix_postmoogle_container_network }}"
|
||||
driver: bridge
|
||||
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
|
||||
|
||||
- name: Ensure matrix-postmoogle.service installed
|
||||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-postmoogle.service.j2"
|
||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postmoogle.service"
|
||||
mode: 0644
|
||||
register: matrix_postmoogle_systemd_service_result
|
||||
@@ -2,24 +2,24 @@
|
||||
|
||||
- name: Check existence of matrix-postmoogle service
|
||||
ansible.builtin.stat:
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
|
||||
register: matrix_bot_postmoogle_service_stat
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postmoogle.service"
|
||||
register: matrix_postmoogle_service_stat
|
||||
|
||||
- when: matrix_bot_postmoogle_service_stat.stat.exists | bool
|
||||
- when: matrix_postmoogle_service_stat.stat.exists | bool
|
||||
block:
|
||||
- name: Ensure matrix-postmoogle is stopped
|
||||
ansible.builtin.service:
|
||||
name: matrix-bot-postmoogle
|
||||
name: matrix-postmoogle
|
||||
state: stopped
|
||||
enabled: false
|
||||
daemon_reload: true
|
||||
|
||||
- name: Ensure matrix-bot-postmoogle.service doesn't exist
|
||||
- name: Ensure matrix-postmoogle.service doesn't exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
|
||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postmoogle.service"
|
||||
state: absent
|
||||
|
||||
- name: Ensure Matrix postmoogle paths don't exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ matrix_bot_postmoogle_base_path }}"
|
||||
path: "{{ matrix_postmoogle_base_path }}"
|
||||
state: absent
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Fail if required Postmoogle settings not defined
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item.name }}`).
|
||||
when: "item.when | bool and vars[item.name] == ''"
|
||||
with_items:
|
||||
- {'name': 'matrix_postmoogle_password', when: true}
|
||||
- {'name': 'matrix_postmoogle_container_network', when: true}
|
||||
- {'name': 'matrix_postmoogle_homeserver', when: true}
|
||||
- {'name': 'matrix_postmoogle_database_hostname', when: "{{ matrix_postmoogle_database_engine == 'postgres' }}"}
|
||||
31
roles/custom/matrix-bridge-postmoogle/templates/env.j2
Normal file
31
roles/custom/matrix-bridge-postmoogle/templates/env.j2
Normal file
@@ -0,0 +1,31 @@
|
||||
POSTMOOGLE_LOGIN={{ matrix_postmoogle_login }}
|
||||
POSTMOOGLE_PASSWORD={{ matrix_postmoogle_password }}
|
||||
POSTMOOGLE_SHAREDSECRET={{ matrix_postmoogle_sharedsecret }}
|
||||
POSTMOOGLE_HOMESERVER={{ matrix_postmoogle_homeserver }}
|
||||
POSTMOOGLE_DOMAINS={{ matrix_postmoogle_domains | join(' ') }}
|
||||
POSTMOOGLE_PORT={{ matrix_postmoogle_port }}
|
||||
POSTMOOGLE_DB_DSN={{ matrix_postmoogle_database_connection_string }}
|
||||
POSTMOOGLE_DB_DIALECT={{ matrix_postmoogle_database_dialect }}
|
||||
POSTMOOGLE_PREFIX={{ matrix_postmoogle_prefix }}
|
||||
POSTMOOGLE_MAXSIZE={{ matrix_postmoogle_maxsize }}
|
||||
POSTMOOGLE_LOGLEVEL={{ matrix_postmoogle_loglevel }}
|
||||
POSTMOOGLE_ADMINS={{ matrix_postmoogle_admins | join(' ') }}
|
||||
POSTMOOGLE_TLS_PORT={{ matrix_postmoogle_tls_port }}
|
||||
POSTMOOGLE_TLS_CERT={{ matrix_postmoogle_tls_cert }}
|
||||
POSTMOOGLE_TLS_KEY={{ matrix_postmoogle_tls_key }}
|
||||
POSTMOOGLE_TLS_REQUIRED={{ matrix_postmoogle_tls_required }}
|
||||
POSTMOOGLE_DATA_SECRET={{ matrix_postmoogle_data_secret }}
|
||||
POSTMOOGLE_PROXIES={{ matrix_postmoogle_proxies | join(' ') }}
|
||||
POSTMOOGLE_RELAY_HOST={{ matrix_postmoogle_relay_host }}
|
||||
POSTMOOGLE_RELAY_PORT={{ matrix_postmoogle_relay_port }}
|
||||
POSTMOOGLE_RELAY_USERNAME={{ matrix_postmoogle_relay_username }}
|
||||
POSTMOOGLE_RELAY_PASSWORD={{ matrix_postmoogle_relay_password }}
|
||||
POSTMOOGLE_MONITORING_SENTRY_DSN={{ matrix_postmoogle_monitoring_sentry_dsn }}
|
||||
POSTMOOGLE_MONITORING_SENTRY_RATE={{ matrix_postmoogle_monitoring_sentry_rate }}
|
||||
POSTMOOGLE_MONITORING_HEALTHCHECKS_UUID={{ matrix_postmoogle_monitoring_healthchecks_uuid }}
|
||||
POSTMOOGLE_MONITORING_HEALTHCHECKS_DURATION={{ matrix_postmoogle_monitoring_healthchecks_duration }}
|
||||
POSTMOOGLE_MAILBOXES_FORWARDED={{ matrix_postmoogle_mailboxes_forwarded | join(' ') }}
|
||||
POSTMOOGLE_MAILBOXES_RESERVED={{ matrix_postmoogle_mailboxes_reserved | join(' ') }}
|
||||
POSTMOOGLE_MAILBOXES_ACTIVATION={{ matrix_postmoogle_mailboxes_activation }}
|
||||
|
||||
{{ matrix_postmoogle_environment_variables_extension }}
|
||||
@@ -1,11 +1,11 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
[Unit]
|
||||
Description=Matrix Postmoogle bot
|
||||
{% for service in matrix_bot_postmoogle_systemd_required_services_list %}
|
||||
Description=Matrix Postmoogle bridge
|
||||
{% for service in matrix_postmoogle_systemd_required_services_list %}
|
||||
Requires={{ service }}
|
||||
After={{ service }}
|
||||
{% endfor %}
|
||||
{% for service in matrix_bot_postmoogle_systemd_wanted_services_list %}
|
||||
{% for service in matrix_postmoogle_systemd_wanted_services_list %}
|
||||
Wants={{ service }}
|
||||
{% endfor %}
|
||||
DefaultDependencies=no
|
||||
@@ -13,42 +13,42 @@ 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 --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
|
||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
|
||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-postmoogle 2>/dev/null || true'
|
||||
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-postmoogle 2>/dev/null || true'
|
||||
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
||||
--rm \
|
||||
--name=matrix-bot-postmoogle \
|
||||
--name=matrix-postmoogle \
|
||||
--log-driver=none \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--read-only \
|
||||
--network={{ matrix_bot_postmoogle_container_network }} \
|
||||
--env-file={{ matrix_bot_postmoogle_config_path }}/env \
|
||||
-p {{ matrix_bot_postmoogle_smtp_host_bind_port }}:{{ matrix_bot_postmoogle_port }} \
|
||||
{% if matrix_bot_postmoogle_ssl_path %}
|
||||
-p {{ matrix_bot_postmoogle_submission_host_bind_port }}:{{ matrix_bot_postmoogle_tls_port }} \
|
||||
--network={{ matrix_postmoogle_container_network }} \
|
||||
--env-file={{ matrix_postmoogle_config_path }}/env \
|
||||
-p {{ matrix_postmoogle_smtp_host_bind_port }}:{{ matrix_postmoogle_port }} \
|
||||
{% if matrix_postmoogle_ssl_path %}
|
||||
-p {{ matrix_postmoogle_submission_host_bind_port }}:{{ matrix_postmoogle_tls_port }} \
|
||||
{% endif %}
|
||||
--mount type=bind,src={{ matrix_bot_postmoogle_data_path }},dst=/data \
|
||||
{% if matrix_bot_postmoogle_ssl_path %}
|
||||
--mount type=bind,src={{ matrix_bot_postmoogle_ssl_path }},dst=/ssl \
|
||||
--mount type=bind,src={{ matrix_postmoogle_data_path }},dst=/data \
|
||||
{% if matrix_postmoogle_ssl_path %}
|
||||
--mount type=bind,src={{ matrix_postmoogle_ssl_path }},dst=/ssl \
|
||||
{% endif %}
|
||||
{% for arg in matrix_bot_postmoogle_container_extra_arguments %}
|
||||
{% for arg in matrix_postmoogle_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_bot_postmoogle_docker_image }}
|
||||
{{ matrix_postmoogle_docker_image }}
|
||||
|
||||
{% for network in matrix_bot_postmoogle_container_additional_networks %}
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-postmoogle
|
||||
{% for network in matrix_postmoogle_container_additional_networks %}
|
||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-postmoogle
|
||||
{% endfor %}
|
||||
|
||||
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-bot-postmoogle
|
||||
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-postmoogle
|
||||
|
||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
|
||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
|
||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-postmoogle 2>/dev/null || true'
|
||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-postmoogle 2>/dev/null || true'
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
SyslogIdentifier=matrix-bot-postmoogle
|
||||
SyslogIdentifier=matrix-postmoogle
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -13,7 +13,7 @@ matrix_cactus_comments_client_public_path: "{{ matrix_cactus_comments_client_bas
|
||||
matrix_cactus_comments_client_public_path_file_permissions: "0644"
|
||||
|
||||
# renovate: datasource=docker depName=joseluisq/static-web-server
|
||||
matrix_cactus_comments_client_version: 2.33.0
|
||||
matrix_cactus_comments_client_version: 2.35.0
|
||||
|
||||
matrix_cactus_comments_client_container_image: "{{ matrix_container_global_registry_prefix }}joseluisq/static-web-server:{{ matrix_cactus_comments_client_container_image_tag }}"
|
||||
matrix_cactus_comments_client_container_image_tag: "{{ 'latest' if matrix_cactus_comments_client_version == 'latest' else (matrix_cactus_comments_client_version + '-alpine') }}"
|
||||
|
||||
@@ -7,7 +7,7 @@ matrix_client_cinny_container_image_self_build: false
|
||||
matrix_client_cinny_container_image_self_build_repo: "https://github.com/ajbura/cinny.git"
|
||||
|
||||
# renovate: datasource=docker depName=ajbura/cinny
|
||||
matrix_client_cinny_version: v4.2.2
|
||||
matrix_client_cinny_version: v4.2.3
|
||||
matrix_client_cinny_docker_image: "{{ matrix_client_cinny_docker_image_name_prefix }}ajbura/cinny:{{ matrix_client_cinny_version }}"
|
||||
matrix_client_cinny_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_cinny_container_image_self_build else matrix_container_global_registry_prefix }}"
|
||||
matrix_client_cinny_docker_image_force_pull: "{{ matrix_client_cinny_docker_image.endswith(':latest') }}"
|
||||
@@ -44,6 +44,11 @@ matrix_client_cinny_container_labels_traefik_entrypoints: web-secure
|
||||
matrix_client_cinny_container_labels_traefik_tls: "{{ matrix_client_cinny_container_labels_traefik_entrypoints != 'web' }}"
|
||||
matrix_client_cinny_container_labels_traefik_tls_certResolver: default # noqa var-naming
|
||||
|
||||
# Controls whether a compression middleware will be injected into the middlewares list.
|
||||
# This compression middleware is supposed to be defined elsewhere (using labels or a File provider, etc.) and is merely referenced by this router.
|
||||
matrix_client_cinny_container_labels_traefik_compression_middleware_enabled: false
|
||||
matrix_client_cinny_container_labels_traefik_compression_middleware_name: ""
|
||||
|
||||
# Controls which additional headers to attach to all HTTP responses.
|
||||
# To add your own headers, use `matrix_client_cinny_container_labels_traefik_additional_response_headers_custom`
|
||||
matrix_client_cinny_container_labels_traefik_additional_response_headers: "{{ matrix_client_cinny_container_labels_traefik_additional_response_headers_auto | combine(matrix_client_cinny_container_labels_traefik_additional_response_headers_custom) }}"
|
||||
@@ -138,9 +143,31 @@ matrix_client_cinny_path_prefix: /
|
||||
# Controls whether the self-check feature should validate SSL certificates.
|
||||
matrix_client_cinny_self_check_validate_certificates: true
|
||||
|
||||
# config.json
|
||||
# Default homeserver URL to use in the `config.json` file.
|
||||
# See `matrix_client_cinny_config_homeserverList`.
|
||||
matrix_client_cinny_default_hs_url: ""
|
||||
|
||||
# Controls the `defaultHomeserver` value in the `config.json` file.
|
||||
matrix_client_cinny_config_defaultHomeserver: 0 # noqa var-naming
|
||||
|
||||
# Controls the `homeserverList` value in the `config.json` file.
|
||||
matrix_client_cinny_config_homeserverList: "{{ [matrix_client_cinny_default_hs_url] }}" # noqa var-naming
|
||||
|
||||
# Controls the `allowCustomHomeservers` value in the `config.json` file.
|
||||
matrix_client_cinny_config_allowCustomHomeservers: true # noqa var-naming
|
||||
|
||||
# Controls the `featuredCommunities.spaces` value in the `config.json` file.
|
||||
matrix_client_cinny_config_featuredCommunities_spaces: [] # noqa var-naming
|
||||
|
||||
# Controls the `featuredCommunities.rooms` value in the `config.json` file.
|
||||
matrix_client_cinny_config_featuredCommunities_rooms: [] # noqa var-naming
|
||||
|
||||
# Controls the `featuredCommunities.servers` value in the `config.json` file.
|
||||
matrix_client_cinny_config_featuredCommunities_servers: ["matrix.org"] # noqa var-naming
|
||||
|
||||
# Controls the `featuredCommunities.openAsDefault` value in the `config.json` file.
|
||||
matrix_client_cinny_config_featuredCommunities_openAsDefault: false # noqa var-naming
|
||||
|
||||
# Default Cinny configuration template which covers the generic use case.
|
||||
# You can customize it by controlling the various variables inside it.
|
||||
#
|
||||
|
||||
@@ -3,10 +3,19 @@
|
||||
ansible.builtin.fail:
|
||||
msg: >
|
||||
You need to define a required configuration setting (`{{ item }}`) to use Cinny.
|
||||
when: "vars[item] == '' or vars[item] is none"
|
||||
when: "item.when | bool and vars[item.name] == ''"
|
||||
with_items:
|
||||
- matrix_client_cinny_default_hs_url
|
||||
- matrix_client_cinny_container_network
|
||||
- {'name': 'matrix_client_cinny_default_hs_url', when: true}
|
||||
- {'name': 'matrix_client_cinny_container_network', when: true}
|
||||
- {'name': 'matrix_client_cinny_container_labels_traefik_compression_middleware_name', when: "{{ matrix_client_cinny_container_labels_traefik_compression_middleware_enabled }}"}
|
||||
|
||||
- name: Fail if matrix_client_cinny_path_prefix is not /
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
`matrix_client_cinny_path_prefix` is set to `{{ matrix_client_cinny_path_prefix }}` in your configuration, but Cinny no longer supports hosting under a path prefix without an application rebuild.
|
||||
Consider removing your `matrix_client_cinny_path_prefix` override and adjusting the Cinny hostname via `matrix_server_fqn_cinny` or `matrix_client_cinny_hostname`.
|
||||
See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3701
|
||||
when: "matrix_client_cinny_path_prefix != '/'"
|
||||
|
||||
- when: matrix_client_cinny_container_labels_traefik_enabled | bool
|
||||
block:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user