mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-05-08 21:30:15 +03:00
Update Draupnir from 3.0.0 to 3.1.0 and introduce Zero Touch Deployment to mdad. (#5205)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2024 - 2026 Catalan Lover <catalanlover@protonmail.com>
|
||||
SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
|
||||
SPDX-FileCopyrightText: 2024 MDAD project contributors
|
||||
|
||||
@@ -13,34 +14,54 @@ Appservice mode can be used together with the regular [Draupnir bot](configuring
|
||||
|
||||
## Draupnir Appservice mode compared to Draupnir bot mode
|
||||
|
||||
The administrative functions for managing the appservice are alpha quality and very limited. However, the experience of using an appservice-provisioned Draupnir is on par with the experience of using Draupnir from bot mode except in the case of avatar customisation as described later on in this document.
|
||||
The administrative functions for managing the appservice are alpha quality and very limited. However, the experience of using an appservice-provisioned Draupnir is on par with the experience of using Draupnir from bot mode.
|
||||
|
||||
Draupnir for all is the way to go if you need more than 1 Draupnir instance, but you don't need access to Synapse Admin features as they are not accessible through Draupnir for All (Even though the commands do show up in help).
|
||||
Draupnir for all is the way to go if you need more than 1 Draupnir instance, but you don't need access to Synapse Admin features as they are not accessible through Draupnir for All.
|
||||
|
||||
Draupnir for all in the playbook is rate-limit-exempt automatically as its appservice configuration file does not specify any rate limits.
|
||||
|
||||
Normal Draupnir does come with the benefit of access to Synapse Admin features. You are also able to more easily customise your normal Draupnir than D4A as D4A even on the branch with the Avatar command (To be Upstreamed to Mainline Draupnir) that command is clunky as it requires the use of things like Element Web devtools. In normal Draupnir this is a quick operation where you login to Draupnir with a normal client and set Avatar and Display name normally.
|
||||
Normal Draupnir does come with the benefit of access to Synapse Admin features. You are also able to more easily customise your normal Draupnir than D4A as the avatar command is clunky as it requires the use of things like Element Web devtools. In normal Draupnir this can be done while logged in to the Draupnir account with a normal client and set Avatar and Display name normally.
|
||||
|
||||
Draupnir for all does not support external tooling like [MRU](https://mru.rory.gay) as it can't access Draupnir's user account.
|
||||
Draupnir for all only has limited support for external tooling like [MRU](https://mru.rory.gay) as it can't access Draupnir's user account.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Create a main management room
|
||||
### Prerequisites for Zero Touch Deployment (recommended)
|
||||
|
||||
The playbook does not create a management room for your Main Draupnir. You **need to create the room manually** before setting up the bot.
|
||||
As of Draupnir 3.1.0, Zero Touch Deployment of Draupnir Appservice Mode (Draupnir for all) requires you to supply the following:
|
||||
|
||||
- MXID of the first person who gets invited to the admin room that the bot creates for you.
|
||||
|
||||
That is all. The appservice manages everything on its own after you provide it with an MXID to invite.
|
||||
|
||||
If proceeding with Zero Touch Deployment, skip ahead to [Adjusting the playbook configuration](#adjusting-the-playbook-configuration).
|
||||
|
||||
### Create an admin room (optional)
|
||||
|
||||
The playbook does not create an admin room for your Draupnir, but the appservice itself can do this for you. Alternatively, you **can create the room manually** before setting up the bot.
|
||||
|
||||
Note that the room must be unencrypted.
|
||||
|
||||
The management room has to be given an alias, and your bot has to be invited to the room.
|
||||
The admin room has to be given an alias, and your bot has to be invited to the room.
|
||||
|
||||
This management room is used to control who has access to your D4A deployment. The room stores this data inside of the control room state so your bot must have sufficient powerlevel to send custom state events. This is default 50 or moderator as Element clients call this powerlevel.
|
||||
This admin room is used to control who has access to your D4A deployment. The room stores this data in the control room state, so your bot must have sufficient power level to send custom state events. This is `50` by default (moderator, as Element clients call this power level).
|
||||
|
||||
> [!WARNING]
|
||||
> Anyone in this room can control the bot so it is important that you only invite trusted users to this room.
|
||||
|
||||
## Adjusting the playbook configuration
|
||||
|
||||
Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file. Make sure to replace `MANAGEMENT_ROOM_ALIAS_HERE`.
|
||||
When using Zero Touch Deployment, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file. Make sure to replace `INITIAL_MANAGER_MXID_HERE` with the MXID of the user who should be invited to the admin room first.
|
||||
|
||||
```yaml
|
||||
matrix_appservice_draupnir_for_all_enabled: true
|
||||
|
||||
matrix_appservice_draupnir_for_all_zero_touch_deploy: true
|
||||
|
||||
matrix_appservice_draupnir_for_all_config_initialManager: "INITIAL_MANAGER_MXID_HERE"
|
||||
```
|
||||
|
||||
If opting out of Zero Touch Deployment, use the following configuration block instead. Make sure to replace `MANAGEMENT_ROOM_ALIAS_HERE` with the alias of the admin room you have created earlier.
|
||||
|
||||
```yaml
|
||||
matrix_appservice_draupnir_for_all_enabled: true
|
||||
@@ -103,20 +124,26 @@ ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
|
||||
|
||||
## Usage
|
||||
|
||||
If you made it through all the steps above and your main control room was joined by a user called `@draupnir-main:example.com` you have successfully installed Draupnir for All and can now start using it.
|
||||
If you made it through all the steps above and your main control room was joined by a user called `@draupnir-main:example.com`, you have successfully installed Draupnir for All and can now start using it.
|
||||
|
||||
The installation of Draupnir for all in this playbook is very much Alpha quality. Usage-wise, Draupnir for all is almost identical to Draupnir bot mode.
|
||||
If using Zero Touch Deployment, the flow is reversed and the success signal is the initial manager account being invited to the admin room.
|
||||
|
||||
Draupnir for all installation via this playbook is very much Alpha quality. Usage-wise, Draupnir for all is almost identical to Draupnir bot mode, except that protections requiring homeserver admin access are not available, and the config file is shared between all bots so legacy protections like wordlist share a single global config.
|
||||
|
||||
### Granting Users the ability to use D4A
|
||||
|
||||
Draupnir for all includes several security measures like that it only allows users that are on its allow list to ask for a bot. To add a user to this list we have 2 primary options. Using the chat to tell Draupnir to do this for us or if you want to automatically do it by sending `m.policy.rule.user` events that target the subject you want to allow provisioning for with the `org.matrix.mjolnir.allow` recommendation. Using the chat is recommended.
|
||||
|
||||
The bot requires a powerlevel of 50 in the management room to control who is allowed to use the bot. The bot does currently not say anything if this is true or false. (This is considered a bug and is documented in issue [#297](https://github.com/the-draupnir-project/Draupnir/issues/297))
|
||||
The bot requires a power level of 50 in the management room to control who is allowed to use the bot. The bot does currently not say anything if this is true or false. (This is considered a bug and is documented in issue [#297](https://github.com/the-draupnir-project/Draupnir/issues/297).) This issue is largely mitigated by the Zero Touch Deployment workflows introduced in Draupnir 3.1.0.
|
||||
|
||||
To allow users or whole homeservers you type /plain !admin allow `target` and target can be either a MXID or a wildcard like `@*:example.com` to allow all users on example.com to register. We use /plain to force the client to not attempt to mess with this command as it can break Wildcard commands especially.
|
||||
To allow users or whole homeservers you type /plain !admin allow `target` and target can be either a MXID or a wildcard like `@*:example.com` to allow all users on example.com to provision a bot. We use /plain to force the client to not attempt to mess with this command as it can break Wildcard commands especially.
|
||||
|
||||
### How to provision a D4A once you are allowed to
|
||||
|
||||
To provision a D4A, you need to start a chat with `@draupnir-main:example.com`. The bot will reject this invite and you will shortly get invited to the Draupnir control room for your newly provisioned Draupnir. From here its just a normal Draupnir experience.
|
||||
Once someone is allowed to provision a bot, simply provision them one with `!admin provision MXID`.
|
||||
|
||||
Congratulations if you made it all the way here because you now have a fully working Draupnir for all deployment.
|
||||
Self-service provisioning is disabled as a security measure because it is currently bugged. Force-provisioning (with `!admin provision`) bypasses this disabled status.
|
||||
|
||||
Note that you should always make sure there is an allow entry matching whoever is provisioned, because once self-service is fixed, the bot of anyone who is not allowed to provision a bot will refuse to start.
|
||||
|
||||
Congratulations if you made it all the way here, because you now have a fully working Draupnir for all deployment.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2023 - 2026 Catalan Lover <catalanlover@protonmail.com>
|
||||
SPDX-FileCopyrightText: 2023 - 2025 MDAD project contributors
|
||||
SPDX-FileCopyrightText: 2023 Kim Brose
|
||||
SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
|
||||
@@ -19,7 +20,17 @@ If your migrating from [Mjolnir](configuring-playbook-bot-mjolnir.md), skip to [
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Create a management room
|
||||
### Prerequisites for Zero Touch Deployment (recommended)
|
||||
|
||||
As of Draupnir 3.1.0, Zero Touch Deployment of Draupnir bot mode requires you to supply the following:
|
||||
|
||||
- MXID of the first person who gets invited to the management room that the bot creates for you.
|
||||
- A permanent access token for authentication. Instructions for obtaining one can be found at [obtain an access token via curl](obtaining-access-tokens.md#obtain-an-access-token-via-curl).
|
||||
- A user account for Draupnir.
|
||||
|
||||
Zero Touch Deployment is the officially preferred installation method for new deployments of Draupnir as of 3.1.0.
|
||||
|
||||
### Create a management room (optional)
|
||||
|
||||
Using your own account, create a new invite only room that you will use to manage the bot. This is the room where you will see the status of the bot and where you will send commands to the bot, such as the command to ban a user from another room.
|
||||
|
||||
@@ -28,6 +39,8 @@ Using your own account, create a new invite only room that you will use to manag
|
||||
|
||||
It is possible to make the management room encrypted (E2EE). If doing so, then you need to enable the native E2EE support (see [below](#native-e2ee-support)).
|
||||
|
||||
E2EE support for the management room is mutually exclusive with Zero Touch Deployment of Draupnir.
|
||||
|
||||
Once you have created the room you need to copy the room ID so you can specify it on your `inventory/host_vars/matrix.example.com/vars.yml` file. In Element Web you can check the ID by going to the room's settings and clicking "Advanced". The room ID will look something like `!qporfwt:example.com`.
|
||||
|
||||
## End-to-End Encryption support
|
||||
@@ -63,7 +76,25 @@ matrix_bot_draupnir_config_accessToken: "CLEAN_ACCESS_TOKEN_HERE"
|
||||
|
||||
## Adjusting the playbook configuration
|
||||
|
||||
To enable the bot, add the following configuration to your `vars.yml` file. Make sure to replace `MANAGEMENT_ROOM_ID_HERE` with the one of the room which you have created earlier.
|
||||
### Configuration for Zero Touch Deployment (recommended)
|
||||
|
||||
To enable the bot using Zero Touch Deployment, add the following configuration to your `vars.yml` file. Make sure to replace `INITIAL_MANAGER_MXID_HERE` with the MXID of the user who should be invited to the management room first, and `CLEAN_ACCESS_TOKEN_HERE` with the access token you obtained.
|
||||
|
||||
```yaml
|
||||
# Enable Draupnir
|
||||
matrix_bot_draupnir_enabled: true
|
||||
|
||||
matrix_bot_draupnir_zero_touch_deploy: true
|
||||
|
||||
matrix_bot_draupnir_config_initialManager: "INITIAL_MANAGER_MXID_HERE"
|
||||
|
||||
# Access token which the bot will use for logging in.
|
||||
matrix_bot_draupnir_config_accessToken: "CLEAN_ACCESS_TOKEN_HERE"
|
||||
```
|
||||
|
||||
### Configuration without Zero Touch Deployment
|
||||
|
||||
If you'd prefer to have the bot manage its own login at the cost of having to create the management room manually, you can use native login with the configuration block below. Make sure to replace `MANAGEMENT_ROOM_ID_HERE` with the ID of the management room you have created earlier.
|
||||
|
||||
```yaml
|
||||
# Enable Draupnir
|
||||
@@ -90,7 +121,7 @@ This is due to the conditional restart logic not being able to reliably tell whe
|
||||
|
||||
Conditional restarts work correctly for all tags when running only one of these two operating modes.
|
||||
|
||||
### Create and invite the bot to the management room
|
||||
### Create and invite the bot to the management room (only when using native login without Zero Touch Deployment)
|
||||
|
||||
Before proceeding to the next step, run the playbook with the following command to create the bot user.
|
||||
|
||||
@@ -102,6 +133,12 @@ ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-use
|
||||
|
||||
Then, invite the bot (`@bot.draupnir:example.com`) to its management room which you have created earlier.
|
||||
|
||||
### Creating a user account for the bot (when using Zero Touch Deployment)
|
||||
|
||||
Since Zero Touch Deployment is not validated with native login, you will need to create the user account manually.
|
||||
|
||||
Refer to [registering users](registering-users.md) for documentation on how to configure the user account.
|
||||
|
||||
### Make sure the account is free from rate limiting (optional, recommended)
|
||||
|
||||
If your homeserver's implementation is Synapse, you will need to prevent it from rate limiting the bot's account. **This is a highly recommended step. If you do not configure it, Draupnir performance will be degraded.**
|
||||
@@ -114,7 +151,7 @@ The APIs can also be accessed via [Ketesa](https://github.com/etkecc/ketesa), a
|
||||
|
||||
#### Add the configuration
|
||||
|
||||
To expose the APIs publicly, add the following configuration to your `vars.yml` file:
|
||||
This is automatically done if Ketesa is enabled. Otherwise, to expose the APIs publicly, add the following configuration to your `vars.yml` file:
|
||||
|
||||
```yaml
|
||||
matrix_synapse_container_labels_public_client_synapse_admin_api_enabled: true
|
||||
@@ -140,6 +177,7 @@ curl --header "Authorization: Bearer ADMIN_ACCESS_TOKEN_HERE" -X POST https://ma
|
||||
```
|
||||
|
||||
**Notes**:
|
||||
|
||||
- This does not work on outdated Windows 10 as curl is not available there.
|
||||
- Even if the APIs are not exposed to the internet, you should still be able to run the command on the homeserver locally.
|
||||
|
||||
@@ -165,13 +203,14 @@ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled: true
|
||||
matrix_bot_draupnir_admin_api_enabled: true
|
||||
```
|
||||
|
||||
These protections need to be manually activated and consulting the [enabling protections](#enabling-built-in-protections) guide can be helpful or consulting upstream documentation.
|
||||
These protections need to be manually activated. Consulting the [enabling protections](#enabling-built-in-protections) guide and/or upstream documentation can be helpful.
|
||||
|
||||
<!--
|
||||
NOTE: this is unsupported by the playbook due to the admin API being inaccessible from containers currently.
|
||||
The other method polls a Synapse Admin API endpoint, hence it is available only if using Synapse and if the Draupnir user is an admin. To enable it, set `pollReports: true` in your `vars.yml` file as below:
|
||||
|
||||
The other method polls an Synapse Admin API endpoint, hence it is available only if using Synapse and if the Draupnir user is an admin (see [above](#register-the-bot-account)). To enable it, set `pollReports: true` on `vars.yml` file as below.
|
||||
-->
|
||||
```yaml
|
||||
matrix_bot_draupnir_configuration_extension_yaml: |
|
||||
pollReports: true
|
||||
```
|
||||
|
||||
### Extending the configuration
|
||||
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ msgid "Granting Users the ability to use D4A"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../docs/configuring-playbook-appservice-draupnir-for-all.md:97
|
||||
msgid "Draupnir for all includes several security measures like that it only allows users that are on its allow list to ask for a bot. To add a user to this list we have 2 primary options. Using the chat to tell Draupnir to do this for us or if you want to automatically do it by sending `m.policy.rule.user` events that target the subject you want to allow provisioning for with the `org.matrix.mjolnir.allow` recomendation. Using the chat is recomended."
|
||||
msgid "Draupnir for all includes several security measures like that it only allows users that are on its allow list to ask for a bot. To add a user to this list we have 2 primary options. Using the chat to tell Draupnir to do this for us or if you want to automatically do it by sending `m.policy.rule.user` events that target the subject you want to allow provisioning for with the `org.matrix.mjolnir.allow` recomendation. Using the chat is recommended."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../docs/configuring-playbook-appservice-draupnir-for-all.md:99
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ msgid "Granting Users the ability to use D4A"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../docs/configuring-playbook-appservice-draupnir-for-all.md:97
|
||||
msgid "Draupnir for all includes several security measures like that it only allows users that are on its allow list to ask for a bot. To add a user to this list we have 2 primary options. Using the chat to tell Draupnir to do this for us or if you want to automatically do it by sending `m.policy.rule.user` events that target the subject you want to allow provisioning for with the `org.matrix.mjolnir.allow` recomendation. Using the chat is recomended."
|
||||
msgid "Draupnir for all includes several security measures like that it only allows users that are on its allow list to ask for a bot. To add a user to this list we have 2 primary options. Using the chat to tell Draupnir to do this for us or if you want to automatically do it by sending `m.policy.rule.user` events that target the subject you want to allow provisioning for with the `org.matrix.mjolnir.allow` recomendation. Using the chat is recommended."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../docs/configuring-playbook-appservice-draupnir-for-all.md:99
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
matrix_appservice_draupnir_for_all_enabled: true
|
||||
|
||||
# renovate: datasource=docker depName=depName=ghcr.io/the-draupnir-project/draupnir
|
||||
matrix_appservice_draupnir_for_all_version: "v3.0.0"
|
||||
matrix_appservice_draupnir_for_all_version: "v3.1.0"
|
||||
|
||||
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"
|
||||
@@ -58,14 +58,34 @@ matrix_appservice_draupnir_for_all_force_restart: "{{
|
||||
matrix_appservice_draupnir_for_all_rolling_tag | bool
|
||||
}}"
|
||||
|
||||
# This controls whether Zero Touch Deployment is enabled.
|
||||
# When enabled, the playbook validates the related settings and only renders
|
||||
# the configuration values Draupnir expects for this mode.
|
||||
# This prevents invalid manual combinations from being passed through, since
|
||||
# Draupnir requires `matrix_appservice_draupnir_for_all_config_adminRoom` to be
|
||||
# unset and `matrix_appservice_draupnir_for_all_config_initialManager` to be a
|
||||
# valid user ID.
|
||||
# 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 that require the flexibility of
|
||||
# non-zero-touch-deployment mode.
|
||||
# Note that enabling this on an existing deployment will cause the bot to recreate the admin room.
|
||||
# Manual policy migration has to be done in that case so as not to break when access controls return to working order.
|
||||
matrix_appservice_draupnir_for_all_zero_touch_deploy: 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 should be a room alias - not a matrix.to URL.
|
||||
# Note: Draupnir is fairly verbose - expect a lot of messages from it.
|
||||
# Appservice mode, unlike bot mode, is not verbose in the admin room.
|
||||
# This room is different for Appservice Mode compared to normal mode.
|
||||
# In Appservice mode it provides functions like user management.
|
||||
matrix_appservice_draupnir_for_all_config_adminRoom: "" # noqa var-naming
|
||||
|
||||
# This controls the MXID of who is invited to the admin room on its creation when using Zero Touch Deployment.
|
||||
# This value is mutually exclusive with matrix_appservice_draupnir_for_all_config_adminRoom
|
||||
# and the bot will crash if you attempt to set both at the same time.
|
||||
matrix_appservice_draupnir_for_all_config_initialManager: "" # noqa var-naming
|
||||
|
||||
# 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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SPDX-FileCopyrightText: 2024 David Mehren
|
||||
# SPDX-FileCopyrightText: 2024 MDAD project contributors
|
||||
# SPDX-FileCopyrightText: 2024 Catalan Lover <catalanlover@protonmail.com>
|
||||
# SPDX-FileCopyrightText: 2024 - 2026 Catalan Lover <catalanlover@protonmail.com>
|
||||
# SPDX-FileCopyrightText: 2024 Slavi Pantaleev
|
||||
# SPDX-FileCopyrightText: 2024 Suguru Hirahara
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2024 MDAD project contributors
|
||||
# SPDX-FileCopyrightText: 2024 Catalan Lover <catalanlover@protonmail.com>
|
||||
# SPDX-FileCopyrightText: 2024 - 2026 Catalan Lover <catalanlover@protonmail.com>
|
||||
# SPDX-FileCopyrightText: 2024 Slavi Pantaleev
|
||||
# SPDX-FileCopyrightText: 2025 Suguru Hirahara
|
||||
#
|
||||
@@ -25,10 +25,19 @@
|
||||
- {'old': 'matrix_appservice_draupnir_for_all_docker_src_files_path', 'new': 'matrix_appservice_draupnir_for_all_container_src_files_path'}
|
||||
- {'old': 'matrix_appservice_draupnir_for_all_container_image_force_pull', 'new': '<removed> (No longer needed due to new docker module doing this natively only if needed.)'}
|
||||
|
||||
- name: Fail if required matrix-bot-draupnir variables are undefined
|
||||
- name: Fail if required matrix-appservice-draupnir-for-all variables are undefined
|
||||
ansible.builtin.fail:
|
||||
msg: "The `{{ item }}` variable must be defined and have a non-null value."
|
||||
msg: "The `{{ item.name }}` variable must be defined and have a non-null value."
|
||||
with_items:
|
||||
- "matrix_appservice_draupnir_for_all_config_adminRoom"
|
||||
- "matrix_bot_draupnir_container_network"
|
||||
when: "lookup('vars', item, default='') == '' or lookup('vars', item, default='') is none"
|
||||
- {'name': 'matrix_appservice_draupnir_for_all_config_adminRoom', when: "{{ not matrix_appservice_draupnir_for_all_zero_touch_deploy }}"}
|
||||
- {'name': 'matrix_appservice_draupnir_for_all_config_initialManager', when: "{{ matrix_appservice_draupnir_for_all_zero_touch_deploy }}"}
|
||||
- {'name': 'matrix_appservice_draupnir_for_all_container_network', when: true}
|
||||
when: "item.when | bool and (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"
|
||||
|
||||
- name: Fail if inappropriate variables are defined
|
||||
ansible.builtin.fail:
|
||||
msg: "The `{{ item.name }}` variable must be undefined or have a null value."
|
||||
with_items:
|
||||
- {'name': 'matrix_appservice_draupnir_for_all_config_adminRoom', when: "{{ matrix_appservice_draupnir_for_all_zero_touch_deploy }}"}
|
||||
- {'name': 'matrix_appservice_draupnir_for_all_config_initialManager', when: "{{ not matrix_appservice_draupnir_for_all_zero_touch_deploy }}"}
|
||||
when: "item.when | bool and not (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"
|
||||
|
||||
+7
-1
@@ -17,9 +17,16 @@ db:
|
||||
engine: "postgres"
|
||||
connectionString: "{{ matrix_appservice_draupnir_for_all_database_connection_string }}"
|
||||
|
||||
{% if not matrix_appservice_draupnir_for_all_zero_touch_deploy %}
|
||||
# A room you have created that scopes who can access the appservice.
|
||||
# See docs/access_control.md
|
||||
adminRoom: {{ matrix_appservice_draupnir_for_all_config_adminRoom | to_json }}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_appservice_draupnir_for_all_zero_touch_deploy %}
|
||||
# The initial manager to invite if the admin room has to be created.
|
||||
initialManager: {{ matrix_appservice_draupnir_for_all_config_initialManager | to_json }}
|
||||
{% endif %}
|
||||
|
||||
# This is a web api that the widget connects to in order to interact with the appservice.
|
||||
webAPI:
|
||||
@@ -37,6 +44,5 @@ maxDraupnirsPerUser: 1
|
||||
# Defaults to false when omitted.
|
||||
allowSelfServiceProvisioning: false
|
||||
|
||||
|
||||
roomStateBackingStore:
|
||||
enabled: {{ matrix_appservice_draupnir_for_all_config_roomStateBackingStore_enabled | to_json }}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user