4
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-05-21 05:18:02 +00:00

Update Draupnir from 3.0.0 to 3.1.0 and introduce Zero Touch Deployment to mdad. (#5205)

This commit is contained in:
Catalan Lover
2026-05-07 15:59:53 +02:00
committed by GitHub
parent d6a1679cad
commit 4af35777b3
11 changed files with 177 additions and 41 deletions

View File

@@ -12,7 +12,7 @@
matrix_bot_draupnir_enabled: true
# renovate: datasource=docker depName=depName=ghcr.io/the-draupnir-project/draupnir
matrix_bot_draupnir_version: "v3.0.0"
matrix_bot_draupnir_version: "v3.1.0"
matrix_bot_draupnir_container_image_self_build: false
matrix_bot_draupnir_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
@@ -115,12 +115,36 @@ matrix_bot_draupnir_password: "{{ matrix_bot_draupnir_pantalaimon_password }}"
# This configuration option does not follow the common naming schema as its not controlling a config key directly.
matrix_bot_draupnir_login_native: false
# 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 controls whether Zero Touch Deployment is enabled.
# When enabled, the playbook validates the settings and only
# renders the configuration values Draupnir expects.
# This prevents invalid manual combinations from being passed through, since
# Draupnir requires `matrix_bot_draupnir_config_managementRoom` to be unset and
# `matrix_bot_draupnir_config_initialManager` to be a valid MXID.
# Zero Touch Deployment is recommended for all new deployments.
# Deployments that are exempt from this recommendation are assumed to be
# advanced setups with specific needs for non-zero-touch mode.
# Note that enabling this on an existing deployment will cause the bot to
# recreate the management room.
# Recreating the management room will cause all protections to reset their settings to defaults
# and cause the recreation of secondary rooms like notification rooms. All bot memory will also be wiped.
matrix_bot_draupnir_zero_touch_deploy: false
# The management room used for administration when Zero Touch
# Deployment is disabled.
# The bot has no access controls, so anyone in this room can use it - secure
# your room!
# This should be a room alias or room ID - not a matrix.to URL.
# Note: Draupnir is fairly verbose - expect a lot of messages from it.
matrix_bot_draupnir_config_managementRoom: "" # noqa var-naming
# The MXID invited as the initial manager when Zero Touch Deployment creates the
# management room.
# This value is mutually exclusive with
# `matrix_bot_draupnir_config_managementRoom`, and the bot will crash if you
# attempt to set both at the same time.
matrix_bot_draupnir_config_initialManager: "" # noqa var-naming
# 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.
matrix_bot_draupnir_config_homeserverUrl: "" # noqa var-naming

View File

@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: 2023 - 2025 MDAD project contributors
# SPDX-FileCopyrightText: 2023 - 2025 Catalan Lover <catalanlover@protonmail.com>
# SPDX-FileCopyrightText: 2023 - 2026 Catalan Lover <catalanlover@protonmail.com>
# SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
#
# SPDX-License-Identifier: AGPL-3.0-or-later
@@ -45,7 +45,8 @@
with_items:
- {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ not matrix_bot_draupnir_pantalaimon_use and not matrix_bot_draupnir_login_native }}"}
- {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_config_experimentalRustCrypto }}"}
- {'name': 'matrix_bot_draupnir_config_managementRoom', when: true}
- {'name': 'matrix_bot_draupnir_config_managementRoom', when: "{{ not matrix_bot_draupnir_zero_touch_deploy }}"}
- {'name': 'matrix_bot_draupnir_config_initialManager', when: "{{ matrix_bot_draupnir_zero_touch_deploy }}"}
- {'name': 'matrix_bot_draupnir_container_network', when: true}
- {'name': 'matrix_bot_draupnir_config_homeserverUrl', when: true}
- {'name': 'matrix_bot_draupnir_config_rawHomeserverUrl', when: true}
@@ -64,6 +65,8 @@
with_items:
- {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
- {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_login_native }}"}
- {'name': 'matrix_bot_draupnir_config_managementRoom', when: "{{ matrix_bot_draupnir_zero_touch_deploy }}"}
- {'name': 'matrix_bot_draupnir_config_initialManager', when: "{{ not matrix_bot_draupnir_zero_touch_deploy }}"}
when: "item.when | bool and not (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"
- name: Fail when matrix_bot_draupnir_config_experimentalRustCrypto is enabled together with matrix_bot_draupnir_pantalaimon_use

View File

@@ -63,6 +63,7 @@ autojoinOnlyIfManager: true
# Whether Draupnir should report ignored invites to the management room (if autojoinOnlyIfManager is true).
recordIgnoredInvites: false
{% if not matrix_bot_draupnir_zero_touch_deploy %}
# The room ID (or room alias) of the management room, anyone in this room can issue commands to Draupnir.
#
# Draupnir has no more granular access controls other than this, be sure you trust everyone in this room - secure it!
@@ -72,6 +73,13 @@ recordIgnoredInvites: false
# Note: By default, Draupnir is fairly verbose - expect a lot of messages in this room.
# (see verboseLogging to adjust this a bit.)
managementRoom: {{ matrix_bot_draupnir_config_managementRoom | to_json }}
{% endif %}
{% if matrix_bot_draupnir_zero_touch_deploy %}
# The initial manager to invite if the management room has to be created.
# Leave this commented out when using a pre-existing management room.
initialManager: {{ matrix_bot_draupnir_config_initialManager | to_json }}
{% endif %}
# The log level of terminal (or container) output,
# can be one of DEBUG, INFO, WARN and ERROR, in increasing order of importance and severity.