Commit Graph

64 Commits

Author SHA1 Message Date
85d82eb1e4 Rework Draupnir report interception to accommodate other Web API uses. (#4221) 2025-04-17 22:47:16 +03:00
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
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
6077c7a1d6 Fix bug in marking Pantal and Rust Crypto as mutually exclusive. 2025-03-14 19:28:20 +02:00
808d0202c7 Fix Rust Crypto variables being partially missed in Rename 2025-03-14 12:23:25 +02:00
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
bf0918ae58 Merge branch 'master' into patch-2 2025-03-05 08:29:35 +02:00
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
e1c03dc7ff Add license information to a role
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-03-05 00:26:05 +09:00
88413a08cb Update gnuxie/draupnir Docker tag to v2.2.0 2025-03-03 20:24:16 +00:00
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
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
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
1034c06fc7 Update gnuxie/draupnir Docker tag to v2.1.0 2025-02-02 16:54:40 +00:00
292b0704cc Update gnuxie/draupnir Docker tag to v2.0.2 2025-01-24 21:29:50 +02:00
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
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
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
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
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
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
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
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
f15c0a46be Draupnir 2.0.0 (#3941)
* Draupnir 2.0.0

The config getting changes all over the place is because of 2.0 having removed a lot of config options due to the code being removed.

* Update Draupnir Documentation to reflect state as of 2.0.0

* Apply Review Feedback

Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Change Room IDs found in code review to not conform to playbook standard.

Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Further Integrate Code Review Feedback

* Apply remaining suggestions from code review.

Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Apply Configuration Review Feedback

Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Add Self Registration and Native Login to Draupnir

* Rework Draupnir Documentation to Remove Pantalaimon

* Set bot.draupnir as default username for the bot in config

* Draupnir 2.0.1

* Integrate Review Feedback on Structure of Docs

Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Further Restructure Docs and tweak variables in response.

* Only auto-create draupnir user if a password has been set

The Draupnir role supports configuring it with either an access token or with a password.

When a password is not assigned (which means the access token mode is used), the user is to be created manually.

* Add ensure-matrix-users-created tag

Now that the Draupnir user may be auto-created in certain configurations (if a password is assigned), it's useful to have the tag there.

---------

Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2025-01-18 21:25:30 +02:00
5ef203777f Fix capitalization: draupnir → Draupnir
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-11-03 16:53:01 +09:00
159daa7466 Use a room alias on Matrix Specification
"#matrix:example.org" is used as an example of a room alias on https://spec.matrix.org/v1.12/#room-aliases

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-21 22:00:32 +09:00
0593edbb1a Replace !example:example.org and !example:example.com with !qporfwt:example.com
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-21 21:48:09 +09:00
55fcaac1f1 Fix capitalization: matrix → Matrix
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-18 23:35:10 +09:00
c89c356e53 Add a global config option for Docker network MTU (#3502)
* Add a global config option for Docker network MTU

* Upgrade systemd_docker_base (v1.2.0-0 -> v1.3.0-0)

The new version includes `devture_systemd_docker_base_container_networks_driver_options`
due to 3cc7d12396

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3502

* Switch from passing matrix_playbook_docker_network_mtu to respecting devture_systemd_docker_base_container_networks_driver_options

Related to:
- 3cc7d12396
- https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3502

* Update all roles to versions that respect `devture_systemd_docker_base_container_networks_driver_options`

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2024-09-18 16:20:27 +03:00
4d46b625ff Draupnir proxy (#3313)
* Allow redircting abuse-reports to draupnir

* Document redirecting abuse-reports to draupnir via traefik

* Apply suggestions from code review

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

* Rename variable

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2024-08-08 06:41:45 +03:00
9f2eff2ac7 Respect devture_systemd_docker_base_docker_service_name
Related to 0241c71a4c

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3270#issuecomment-2143782962

With this change, it should be possible for people to adjust the Docker
dependency from `docker.service` to something else (e.g. `pkg-ContainerManager-dockerd.service`),
or to completely eliminate it by setting `devture_systemd_docker_base_docker_service_name` to an empty string.

This makes it easier for people to use the playbook against a Synology DSM server.
2024-06-04 13:14:34 +03:00
38b4c2e21f Merge pull request #3240 from FSG-Cat/PantalFixes-and-Improvements
Improve Pantalaimon Support in Draupnir and add Mjolnir support
2024-03-25 07:05:06 +02:00
3b7468787f Improve Pantalaimon Support in Draupnir and add Mjolnir support 2024-03-24 21:55:21 +01:00
530df651c2 Pin Draupnir Appservice to 1.87.0 instead of Develop & update Draupnir
Appservice Draupnir for All required Develop before the release of 1.87.0 to work at all in the playbook. Now that we have a release to pin to we will return to being pinned to a release. Especially as Draupnir 2.0.0 push is happening now in main. This will mean that Draupnir develop is expected to be much more unstable than usual for a bit so its important that we pin to a stable release. These releases are validated due to having been dogfooded ever since D4A was merged into the playbook.
2024-03-24 21:03:56 +01:00
3758b0cfeb Squashed commit of the following:
commit cf8637efaca0a0be3609fd6add0dff893a0a9194
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sun Mar 24 19:14:57 2024 +0200

    Make devture_systemd_docker_base_ipv6_enabled automatically reconfigure geerlingguy/ansible-role-docker

    Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3218

commit dc7af3bc7d25f321bf409477d823e43ea8a05803
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sun Mar 24 19:10:31 2024 +0200

    Replace matrix_ipv6_enabled with devture_systemd_docker_base_ipv6_enabled

    Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3218

commit 07e900d6a2926233a4fce34d9d8be292ff115260
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sun Mar 24 19:01:51 2024 +0200

    Improve matrix_ipv6_enabled comments

commit 3f03ca7f6983cb06b64607efef7a96b30c7def5b
Author: Tilo Spannagel <development@tilosp.de>
Date:   Sat Mar 9 19:27:50 2024 +0000

    Add setting to enable ipv6
2024-03-24 19:15:43 +02:00
0049ddf002 Add Pantalaimon support
This is actually authored by Julian Foad here
(https://lab.trax.im/matrix/matrix-docker-ansible-deploy), but was in
need of a rebase and various adjustments caused by huge playbook
refactoring that landed in the past months.

This rework is completely untested.

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/266
2024-03-24 18:35:34 +02:00
89288cce0e Update gnuxie/draupnir Docker tag to v1.86.2 2024-02-09 21:13:33 +00:00
2c06aa1d04 Update gnuxie/draupnir Docker tag to v1.86.1 2024-02-01 20:11:51 +00:00
c4992ca018 Explicitly Declare Draupnir and Mjolnir Config and enter Bot Mode
This should resolve [#2296](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2296) by fixing the noted issue.

This also paves the way for in the future working on D4A mode but that would require a rework to how these variables are done.
2024-01-24 15:26:05 +01:00
95f989ae8b Update Draupnir to 1.86.0 from 1.85.1 2024-01-16 01:56:41 +01:00
c0308307e2 Make homeserver services sleep after startup, instead of all dependencies sleeping separately
This is an attempt at optimizing service startup.

The effect is most pronounced when many services are restarted one by one.
The systemd service manager role sometimes does this - for example when `just install-service synapse` runs.
In such cases, a 5-second delay for each Synapse worker service
(or other bridge/bot service that waits on the homeserver) quickly adds up to a lot.

When services are all stopped fully and then started, the effect is not so pronounced, because
`matrix-synapse.service` starts first and pulls all worker services (defined as `Wants=` for it).
Later on, when the systemd service manager role "starts" these worker services, they're started already.
Even if they had a 5-second wait each, it would have happened in parallel.
2024-01-12 12:45:18 +02:00
6deb99f31b Add missing network-creation tasks for some bot roles 2024-01-07 09:46:09 +02:00
88ad58fccb Move matrix-bot-draupnir to its own container network 2024-01-07 09:04:38 +02:00
2511b34a7c Stop containers gracefully, instead of outright killing them 2023-12-06 11:52:23 +02:00
c846ed199b Annotate version numbers with renovate metadata 2023-10-06 14:14:03 +02:00
593b3157b9 Fix systemd service Wants for mjolnir and draupnir
Patch contributed by JulianF.
2023-10-03 15:05:30 +03:00
c7c1acc3f3 Update Draupnir from 1.85.0 to 1.85.1 2023-09-12 15:42:31 +02:00
a9ece0c55a Remove trailing spaces making linter unhappy 2023-09-07 19:36:49 +02:00
2f6829e6d7 Replace links to Gnuxie/Draupnir with the-draupnir-project/Draupnir
Draupnir moved its repo on github from the namespace of its maintainer Gnuxie to a newly created Github Organisation the-draupnir-project and this commit reflects this.
2023-09-07 19:33:25 +02:00
7ee720f138 Update Draupnir from 1.84.0 to 1.85.0 and update default configuration 2023-09-07 19:19:11 +02:00