From 166f4127837ce1debfb7d60268255e08539b4a98 Mon Sep 17 00:00:00 2001 From: Catalan Lover <48515417+FSG-Cat@users.noreply.github.com> Date: Thu, 13 Mar 2025 19:25:30 +0100 Subject: [PATCH] Modernise Draupnir Configuration Variable Names (#4170) * Modernise Draupnir Configuration Variable Names * Move Draupnir deprecation-check task before undefined-variables-check * Fix trailing spaces in Draupnir's `validate_config.yml` --------- Co-authored-by: Slavi Pantaleev --- docs/configuring-playbook-bot-draupnir.md | 10 ++--- group_vars/matrix_servers | 6 +-- group_vars/matrix_servers.license | 2 +- .../matrix-bot-draupnir/defaults/main.yml | 25 ++++++----- .../custom/matrix-bot-draupnir/tasks/main.yml | 1 + .../tasks/setup_install.yml | 1 + .../tasks/setup_uninstall.yml | 1 + .../tasks/validate_config.yml | 43 ++++++++++++------- .../templates/production.yaml.j2 | 21 ++++----- .../matrix-bot-draupnir.service.j2.license | 1 + 10 files changed, 65 insertions(+), 46 deletions(-) diff --git a/docs/configuring-playbook-bot-draupnir.md b/docs/configuring-playbook-bot-draupnir.md index 92f5c5969..8465dcbd8 100644 --- a/docs/configuring-playbook-bot-draupnir.md +++ b/docs/configuring-playbook-bot-draupnir.md @@ -58,7 +58,7 @@ matrix_bot_draupnir_enable_experimental_rust_crypto: true # Access token which the bot will use for logging in. # Comment out `matrix_bot_draupnir_login_native` when using this option. -matrix_bot_draupnir_access_token: "CLEAN_ACCESS_TOKEN_HERE" +matrix_bot_draupnir_config_accessToken: "CLEAN_ACCESS_TOKEN_HERE" ``` ## Adjusting the playbook configuration @@ -73,13 +73,13 @@ matrix_bot_draupnir_enabled: true # matrix_bot_draupnir_login: bot.draupnir # Generate a strong password for the bot. You can create one with a command like `pwgen -s 64 1`. -# If creating the user on your own and using `matrix_bot_draupnir_access_token` to login you can comment out this line. +# If creating the user on your own and using `matrix_bot_draupnir_config_accessToken` to login you can comment out this line. matrix_bot_draupnir_password: PASSWORD_FOR_THE_BOT -# Comment out if using `matrix_bot_draupnir_enable_experimental_rust_crypto: true` or `matrix_bot_draupnir_access_token` to login. +# Comment out if using `matrix_bot_draupnir_enable_experimental_rust_crypto: true` or `matrix_bot_draupnir_config_accessToken` to login. matrix_bot_draupnir_login_native: true -matrix_bot_draupnir_management_room: "MANAGEMENT_ROOM_ID_HERE" +matrix_bot_draupnir_config_managementRoom: "MANAGEMENT_ROOM_ID_HERE" ``` ### Create and invite the bot to the management room @@ -142,7 +142,7 @@ Draupnir can receive reports in the management room. The bot can intercept the report API endpoint of the client-server API, which requires integration with the reverse proxy in front of the homeserver. If you are using Traefik, this playbook can set this up for you: ```yaml -matrix_bot_draupnir_abuse_reporting_enabled: true +matrix_bot_draupnir_config_web_abuseReporting: true ```