Commit Graph

91 Commits

Author SHA1 Message Date
Slavi Pantaleev
6da1223500 Rename _requires_restart to _migration_requires_restart across all custom roles
These variables track whether a database migration necessitates a service
restart. The new name avoids confusion with the conditional restart
feature introduced in af193043/9accc848/4a8df138, where
devture_systemd_service_manager handles restarting services whose
configuration or image changed. The old _requires_restart name was
ambiguous — it could be mistaken for the systemd_service_manager
mechanism — so _migration_requires_restart makes the purpose explicit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:46:06 +02:00
Slavi Pantaleev
9d6c8eabcb Fix swapped Requires=/Wants= directives in Draupnir and Mjolnir systemd service templates
Commit 593b3157b ("Fix systemd service Wants for mjolnir and draupnir")
accidentally swapped the variable loops: `systemd_wanted_services_list`
ended up generating `Requires=`/`After=` directives and
`systemd_required_services_list` ended up generating `Wants=` directives —
the opposite of what the variable names mean and how every other
bot/bridge service template in the playbook works.

This caused these bots to only `Wants=` (not `Requires=`/`After=`) their
dependencies like matrix-traefik.service, so systemd didn't guarantee
ordering. During all-at-once restarts, the bots would start before traefik
was ready, fail with DNS resolution errors, and crash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 18:54:41 +02:00
renovate[bot]
16bec7bfbb chore(deps): update gnuxie/draupnir docker tag to v2.9.0 2025-12-18 16:48:46 +02:00
Slavi Pantaleev
ebdb2cc827 Use a proper (bool) value for the matrix_bot_draupnir_login_native variable
Otherwise Ansible casts the "" string to a bool.
This works, but it's deprecated and a bad idea anyway.
2025-11-26 13:20:20 +02:00
Slavi Pantaleev
430f350733 Stop using deprecated vars variable 2025-11-26 11:35:09 +02:00
renovate[bot]
2eadddcde9 chore(deps): update gnuxie/draupnir docker tag to v2.8.0 2025-11-23 15:57:05 +02:00
renovate[bot]
7caa583743 chore(deps): update gnuxie/draupnir docker tag to v2.7.1 2025-10-13 16:35:03 +00:00
renovate[bot]
4145b811a3 chore(deps): update gnuxie/draupnir docker tag to v2.7.0 2025-10-10 16:06:57 +03:00
renovate[bot]
c4968592d9 Update gnuxie/draupnir Docker tag to v2.6.1 2025-08-14 18:35:47 +00:00
Aine
6658c690cb allow native draupnir (bot) auth using login/password 2025-08-13 07:38:00 +03:00
renovate[bot]
b129ab77cd Update gnuxie/draupnir Docker tag to v2.6.0 2025-08-12 22:45:55 +03:00
renovate[bot]
593fbd74de Update gnuxie/draupnir Docker tag to v2.5.1 2025-08-07 08:38:18 +03:00
Slavi Pantaleev
51ab9ed9ff Adjust lstrip_blocks to use a bool value for compatibility with ansible-core>=2.19.0
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4445
2025-07-26 17:58:12 +03:00
Slavi Pantaleev
a1f6ee4dc9 Improve compatibility with ansible-core>=2.19.0 by not reaching into vars
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4445
2025-07-26 17:50:20 +03:00
renovate[bot]
2d1b1cfdde Update gnuxie/draupnir Docker tag to v2.5.0 2025-07-09 22:42:50 +03:00
Catalan Lover
31a7f4367c Update Draupnir role Synapse-http-antispam config to match upstream. (#4392) 2025-06-28 10:49:37 +03:00
renovate[bot]
93fffee6a4 Update gnuxie/draupnir Docker tag to v2.4.1 2025-06-24 06:09:26 +03:00
renovate[bot]
91817e8335 Update gnuxie/draupnir Docker tag to v2.4.0 2025-06-23 15:09:42 +03:00
Suguru Hirahara
3653f9f89b Run codespell --write-changes
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-06-03 10:36:00 +03:00
Catalan Lover
a2ddbb8169 Update Draupnir config template to v2.3.1 template
Also removes the FIX ME for Polling as well it being broken in the playbook is no longer true.
2025-05-30 13:02:25 +03:00
renovate[bot]
2c9aa1af9c Update gnuxie/draupnir Docker tag to v2.3.1 2025-05-30 00:19:40 +03:00
renovate[bot]
1dc404dc5f Update gnuxie/draupnir Docker tag to v2.3.0 2025-05-29 22:34:47 +03:00
Catalan Lover
4e0f031ebd Fix Synapse-HTTP-Antispam configuration error in Draupnir 2025-05-08 12:39:30 +03:00
Slavi Pantaleev
360ee544a9 Make indentation level in roles/custom/matrix-bot-draupnir/defaults/main.yml consistent 2025-05-08 10:06:17 +03:00
Slavi Pantaleev
465df3a949 Add support for synapse-http-antispam and integrate it with Draupnir
Supersedes https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4284
2025-05-08 10:03:53 +03:00
Slavi Pantaleev
3ee7deb2d7 Rename variable (matrix_user_groupname -> matrix_group_name) 2025-04-29 10:39:41 +03:00
Slavi Pantaleev
9fc5cdab33 Rename variable (matrix_user_username -> matrix_user_name) 2025-04-29 10:39:41 +03:00
Catalan Lover
85d82eb1e4 Rework Draupnir report interception to accommodate other Web API uses. (#4221) 2025-04-17 22:47:16 +03:00
Slavi Pantaleev
a0573e5855 Fix undefined variable usage in Draupnir config (matrix_bot_draupnir_config_enableMakeRoomAdminCommand -> matrix_bot_draupnir_config_admin_enableMakeRoomAdminCommand)
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3389
2025-03-15 09:29:16 +02:00
Catalan Lover
cd60cf1199 Internal Admin API and Draupnir Hjack Command Config (#3389)
* Enable Internal Admin API Access separately from Public access.

* Add Config variable for Draupnir Hijack command

And also make the internal admin API be automatically  activated when this capability is used.

* Apply suggestions from code review

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

* Further Refine Internal Admin API

* Add Non Worker Labels for Internal Admin API

* Variable Rename

* Add validation rules for Internal Synapse admin API

* Add Draupnir Admin API required config validation.

* Override `matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_traefik_entrypoints` via group vars

* Wire `matrix_bot_draupnir_admin_api_enabled` to `matrix_bot_draupnir_config_admin_enableMakeRoomAdminCommand` in Draupnir's `defaults/main.yml`

* Remove unnecessary `matrix_bot_draupnir_admin_api_enabled` override from `group_vars/matrix_servers`

The same value is now (more appropriately) defined in Draupnir's `defaults/main.yml` file anyway.

* Add additional condition (`matrix_bot_draupnir_enabled`) for enabling `matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled`

* Use a separate task for validating `matrix_bot_draupnir_admin_api_enabled` when `matrix_bot_draupnir_config_admin_enableMakeRoomAdminCommand`

The other task deals with checking for null and not-blank and can't handle booleans properly.

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2025-03-15 09:14:55 +02:00
Catalan Lover
6077c7a1d6 Fix bug in marking Pantal and Rust Crypto as mutually exclusive. 2025-03-14 19:28:20 +02:00
Catalan Lover
808d0202c7 Fix Rust Crypto variables being partially missed in Rename 2025-03-14 12:23:25 +02:00
Catalan Lover
166f412783 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 <slavi@devture.com>
2025-03-13 20:25:30 +02:00
Slavi Pantaleev
bf0918ae58 Merge branch 'master' into patch-2 2025-03-05 08:29:35 +02:00
Suguru Hirahara
c18fc93a22 Update validate_config.yml files: edit the banner message for variables name
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-03-05 13:30:50 +09:00
Suguru Hirahara
e1c03dc7ff Add license information to a role
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-03-05 00:26:05 +09:00
renovate[bot]
88413a08cb Update gnuxie/draupnir Docker tag to v2.2.0 2025-03-03 20:24:16 +00:00
Slavi Pantaleev
c47eca389b Rework all roles to include component_(docker|container)_image_registry_prefix* variables
This:

- brings consistency - no more mixing `_name_prefix` and `_registry_prefix`
- adds extensibility - a future patch will allow reconfiguring all registry prefixes for all roles in the playbook

We still have `_docker_` vs `_container_` inconsistencies.
These may be worked on later.
2025-02-24 11:38:47 +02:00
Slavi Pantaleev
d6bf789710 Remove matrix_container_global_registry_prefix variable
This is done for a few reasons:

- less globals and more indepdendence for each role is better. We rely
  on various externally-hosted roles and they don't rely on this global
  either.

- `matrix_container_global_registry_prefix` could make people think they
  could just override this variable and have all their images pull from
  elsewhere. This is rarely the case, unless you've taken special care
  to mirror all the various components (from their respective
  registries) to your own. In such a case, you probably know what you're
  mirroring and can adjust individual variables.

- nowadays, various components live on different registries.
  With Docker Inc tightening rate limits for Docker Hub, it's even more
  likely that we'll see increased diversity in where images are hosted
2025-02-23 10:15:41 +02:00
Slavi Pantaleev
d12643eb91 Do not use docker stop --time (deprecated in Docker v28 in favor of --timeout or just -t)
`-t` works on both old and new Docker versions, so it's best to use that.
2025-02-22 21:42:18 +02:00
renovate[bot]
1034c06fc7 Update gnuxie/draupnir Docker tag to v2.1.0 2025-02-02 16:54:40 +00:00
renovate[bot]
292b0704cc Update gnuxie/draupnir Docker tag to v2.0.2 2025-01-24 21:29:50 +02:00
Suguru Hirahara
9d3ef6134b Update roles/custom/matrix-bot-draupnir/defaults/main.yml: make sure what the word "it" means here
Here "it" should not mean "the upstream advice".

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-21 14:53:08 +09:00
Suguru Hirahara
7b979ff7a9 Update roles/custom/matrix-bot-draupnir/defaults/main.yml: replace "when" with "if" for consistency and to clarify that these are conditions
Note that there is no other "when" on this file. It is not sensible to keep these exceptions here.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-21 13:58:04 +09:00
Suguru Hirahara
665f7369d6 Update roles/custom/matrix-bot-draupnir/defaults/main.yml: change the subject who discourages Pantalaimon
This change clarifies that it is the upstream project, not this project owner, that discourages enabling Pantalaimon for Draupnir. This distinction should make it clear who is responsible for the matter.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-21 13:43:12 +09:00
Suguru Hirahara
a7e1474c3a Update roles/custom/matrix-bot-draupnir/defaults/main.yml: strip a noisy warning and the order to check in at the upstream
Multiple use of the phrase "you know what you are doing" does not increase its effect but rather makes it noisy instead. Since it is warned with capitalized "DO NOT", it is enough.

Also replace the order to check in at the upstream with the recommendation, as it is inconsistent for this project overall to ask users to do so. It is not sensible to make an exception for Draupnir.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-21 12:48:30 +09:00
Suguru Hirahara
5731bcd222 Update roles/custom/matrix-bot-draupnir/defaults/main.yml: fix another sentence and capitalization
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-21 12:31:16 +09:00
Suguru Hirahara
8fadab4ee8 Change the expression and fix other typos
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-21 12:17:50 +09:00
Suguru Hirahara
c3e9e51385 Update roles/custom/matrix-bot-draupnir/defaults/main.yml: clarify that setting "matrix_bot_draupnir_pantalaimon_use" to false is opinionated
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-20 18:10:40 +09:00
Suguru Hirahara
9c5cd42af1 Update roles/custom/matrix-bot-draupnir/defaults/main.yml: fix capitalization, typo, and sentences
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-01-20 18:10:31 +09:00