Commit Graph

53 Commits

Author SHA1 Message Date
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
0810054b78 Add license information to files for matrix-bridge-mautrix-telegram
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-03-01 21:05:02 +09:00
2129cbf95e Fix yamllint-reported errors 2025-02-24 11:47:53 +02:00
b88b6ae7a3 Introduce a new matrix_container_global_registry_prefix_override variable and make all roles respect it
`matrix_container_global_registry_prefix_override` may look similar to
the old `matrix_container_global_registry_prefix` variable
(removed in d6bf789710), but it's different.

The old `matrix_container_global_registry_prefix` variable was just a hardcode of `docker.io/` and roles that
needed to refer to `docker.io/` could use it. However, this was:

- not used by all roles, because some need another registry (not `docker.io/`)
- used only by roles within the playbook (`roles/custom`), not external roles

Overriding the old `matrix_container_global_registry_prefix` variable was rather pointless,
as it didn't cover everything.

The new `matrix_container_global_registry_prefix_override` variable, on the other hand,
lets you override the registry prefix for all components, regardless of whether they
use `docker.io/` or another registry by default.

This is useful to people who have somehow mirrored all container images to their own registry,
as it provides them with a single variable they can flip to influence the whole playbook.
2025-02-24 11:38:47 +02: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
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
beeb8a7933 Remove some "generate" values from various mautrix bridges
We do not let bridges update config files, so generation cannot happen.
We don't want the bridge to manage the config file anyway.
2024-12-17 12:00:39 +02:00
1d4451ccd2 Use common strings: "user ID"
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-12-09 14:41:08 +09:00
64d6f77abf Edit user identifier examples: to @alice
From `@<username>`, `@your_username`, `@example`, etc.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-12-09 14:40:49 +09:00
ec5e379672 Update old references to com.devture.ansible.role.postgres & com.devture.ansible.role.traefik
Provoked by https://github.com/mother-of-all-self-hosting/mash-playbook/pull/280
2024-10-07 08:46:33 +03:00
8445843562 Switch postgres/postgres-backup Ansible role sources and adjust variable names (devture_postgres_ -> postgres_) 2024-09-27 09:37:24 +03: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
53f3c94bef Enable backfilling for mautrix-gmessages, mautrix-signal and mautrix-slack
We'be already been going against upstream defaults and have been
enabling backfilling for a few other bridges (Messenger, Instagram, Telegram, Twitter).

Now I'm enabling backfilling by default for the remaining ones, for
consistency.
2024-09-17 09:39:35 +03:00
f0479dbd9e Add appservice-double-puppet double-puppeting support to mautrix-telegram
Shared Secret Auth double puppeting still works for this bridge, but
is deprecated and will go away in the future.
2024-08-17 21:08:28 +03:00
5cb12ca2fb chore(deps): update dock.mau.dev/mautrix/telegram docker tag to v0.15.2 2024-07-16 15:13:07 +00: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
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
23aee07cf4 feat: global option to configure all bridges encryption default
Signed-off-by: gardar <gardar@users.noreply.github.com>
2024-03-24 02:58:03 +00:00
f10bc264da chore(deps): update Telegrambot config 2024-01-20 12:58:41 +01:00
48a4afb114 Make Traefik labels files look better
This moves the comments from being just in Jinja,
to actually ending up in the generated `labels` file,
which makes inspection of the final result easier.

Also, some new lines were added here and there to make labels
more legible.

The generated file may still include weird new-lines due to
various `if` statements yielding content or not, but that's not so ugly
anymore - now that we have proper start/end sections that are visible in
the final `labels` file.
2024-01-15 10:41:15 +02: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
f9b4ae8241 Move matrix-bridge-mautrix-telegram to its own container network and add native Traefik support 2024-01-07 17:35:10 +02:00
7ec6fd3dfe Make bridges/bots use matrix_addons_homeserver_client_api_url (instead of matrix_homeserver_container_url) 2024-01-07 17:04:23 +02:00
0ded422cf9 chore(deps): update dock.mau.dev/mautrix/telegram docker tag to v0.15.1 2023-12-26 18:33:59 +00:00
2511b34a7c Stop containers gracefully, instead of outright killing them 2023-12-06 11:52:23 +02:00
95c2db3bb3 mautrix: allow relay access by default, closes #3014 2023-11-29 13:32:14 +02:00
22567043e4 chore(deps): update dock.mau.dev/mautrix/telegram docker tag to v0.15.0 2023-11-26 21:10:12 +00:00
c846ed199b Annotate version numbers with renovate metadata 2023-10-06 14:14:03 +02:00
d2630ccf98 Update telegram 0.14.1 -> 0.14.2 2023-09-19 21:58:50 +03:00
7b10e7d4e0 Upgrade mautrix-telegram (0.14.0 -> 0.14.1) 2023-06-26 17:35:55 +03:00
b9d9a41ea6 update mautrix-telegram 0.13.0 -> 0.14.0 2023-05-26 19:28:27 +00:00
7399496d33 one var to control encryption across all bridges (#2629)
* one var to control encryption across all bridges

* move var to matrix-base
2023-04-05 14:59:48 +03:00
dddfee16bc Fix all 300+ ansible-lint-reported errors 2023-03-07 17:28:15 +02:00
7852d5eb26 update mautrix-telegram 0.12.2 -> 0.13.0 2023-02-26 15:58:10 +00:00
d1b4a6ebe1 unify docker images urls 2023-01-14 15:26:58 +02:00
4b111d05d5 Pass devture_postgres_db_migration_request to com.devture.ansible.role.postgres in a cleaner way 2022-11-28 07:44:59 +02:00
910cd9adf0 Replace import_role calls with include_role calls 2022-11-27 11:27:01 +02:00
2688e8bfc3 Optimize initial installation by not reloading systemd after each .service install
We expect `--tags=start` to handle systemd reloading, so we don't need
to do it manually each time we install/uninstall a .service file.
2022-11-27 10:02:45 +02:00
7b43ef34b7 Remove more hardcoded matrix-postgres references 2022-11-27 09:16:18 +02:00
04b9483f0d Switch from matrix-postgres to com.devture.ansible.role.postgres 2022-11-27 08:04:31 +02:00
ea0c9ed71d update mautrix-telegram 0.12.1 -> 0.12.2 2022-11-26 18:48:04 +00:00
a04f6f4e3d Optimize uninstall tasks a bit
- forego removing Docker images - it's not effective anyway, because it
  only removes the last version.. which is a drop in the bucket, usually

- do not reload systemd - it's none of our business. `--tags=start`,
  etc., handle this

- combine all uninstall tasks under a single block, which only runs if
  we detect traces (a leftover systemd .service file) of the component.
  If no such .service is detected, we skip them all. This may lead to
  incorect cleanup in rare cases, but is good enough for the most part.
2022-11-25 17:28:57 +02:00
61f67d8f0a Add install-* tags for quicker runs 2022-11-25 16:02:51 +02:00
7c2a7a8eb6 Replace most import_tasks calls with include_tasks for improved performance 2022-11-24 11:33:45 +02:00
07c23b7cb0 Remove matrix_synapse_role_executed and various tasks that check it
This was useful when the order of these roles in relation to Synapse
mattered (when we were injecting stuff into Synapse variables during
runtime). This is no longer the case since 0ea7cb5d18, so all of
this can be removed.
2022-11-23 16:13:07 +02:00
735bacca89 Do not run matrix-nginx-proxy config injection tasks unless necessary
These `init.yml` (now `inject_into_nginx_proxy.yml`) tasks do not need
to `always` run. They only need to run for `setup-all` and
`setup-nginx-proxy`. Unless we're dealing with these 2 tags, we can
spare ourselves a lot of work.

This patch also moves the `when` statement from `init.yml` into
`main.yml` in an effort to further optimize things by potentially
avoiding the extra file include.
2022-11-23 15:52:58 +02:00
0ea7cb5d18 Remove various init.yml files - initialize systemd services, etc., statically (not at runtime) 2022-11-23 11:45:46 +02:00
d3bd1ca024 matrix_*_retries_{count,delay} -> devture_playbook_help_*_retries_{count,delay} 2022-11-04 16:44:29 +02:00
7086c0ebe3 matrix_host_command_sh -> devture_systemd_docker_base_host_command_sh (via com.devture.ansible.role.systemd_docker_base) 2022-11-04 16:40:25 +02:00
a9a81460ec matrix_host_command_docker -> devture_systemd_docker_base_host_command_docker (via com.devture.ansible.role.systemd_docker_base) 2022-11-04 16:39:35 +02:00