Slavi Pantaleev
d876da4186
Explicitly tell template-lookup to not auto-parse JSON files
...
ansible-core>=2.19.0 only auto-parses YAML files, not JSON.
Previous ansible-core versions auto-parsed JSON as well, but ansible-core>=2.19.0
doesn't, so we added a `from_json` post-filter.
However, older versions auto-parsing JSON and turning it into a dict, on
which we later run `from_json` is no good.
In this patch, we try to equalize behavior and configure Ansible to never parse JSON,
hopefully making old-Ansible behave like new Ansible.
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4458
Ref: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_lookup.html#parameter-convert_data
2025-07-27 07:45:58 +03:00
Slavi Pantaleev
90813b3739
Pass the result of JSON-file template lookups through from_json
for better ansible-core>=2.19.0 compatibility
...
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4445
It seems like ansible-core 2.19.0 no longer automatically parses template lookup content
as JSON (into a dict) when dealing with template files (be it `file.json.j2` or `file.j2`).
For files detected to contain YAML (`.ya?ml.j2`, but possibly others),
it automatically parses YAML, because the `convert_data` option
for the template lookup defaults to `true`.
Ref: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_lookup.html
2025-07-26 18:53:11 +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
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
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
2889607941
Add license information to files for matrix-corporal
...
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org >
2025-02-27 18:30:12 +09:00
Slavi Pantaleev
7d4f9fe7dc
Upgrade matrix-corporal (3.1.3 -> 3.1.4) and switch where its gets pulled from
...
From 3.1.4 and onward, container images will be published to ghcr.io instead of docker.io.
These images are built for arm64 and amd64, but not for arm32 anymore.
2025-02-25 17:54:45 +02: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
Slavi Pantaleev
d5d64f7ca3
Upgrade matrix-corporal (3.1.2 -> 3.1.3)
2025-02-03 11:46:43 +02:00
Slavi Pantaleev
3104126099
Upgrade matrix-corporal (3.1.1 -> 3.1.2)
2024-12-08 12:07:00 +02:00
Slavi Pantaleev
2296113b69
Upgrade matrix-corporal (3.0.0 -> 3.1.1)
2024-11-29 09:48:35 +02:00
David Mehren
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
Slavi Pantaleev
1184b3df02
Upgrade matrix-corporal (2.8.0 -> 3.0.0)
2024-08-08 11:59:07 +03:00
Slavi Pantaleev
3e3ce659fe
Upgrade matrix-corporal (2.7.0 -> 2.8.0)
2024-07-04 22:05:25 +03:00
Slavi Pantaleev
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
Slavi Pantaleev
7891268873
Do not hardcode https:// in all remaining places, refer to matrix_static_files_scheme
...
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3333
2024-05-25 16:14:26 +03:00
Slavi Pantaleev
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 07e900d6a2
Author: Slavi Pantaleev <slavi@devture.com >
Date: Sun Mar 24 19:01:51 2024 +0200
Improve matrix_ipv6_enabled comments
commit 3f03ca7f69
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
Slavi Pantaleev
51df34e7ae
Ensure each container labels file defines at least one service
...
Most of these files were defining a service, usually toward the end.
These lines have been moved upward.
Some components (mautrix-signal, mautrix-gmessages, etc.) were defining
a service conditionally (only if metrics are exposed, etc). This was
causing issues like these in the Traefik logs:
> level=error msg="service \"matrix-mautrix-twitter\" error: port is missing" providerName=docker container=matrix-mautrix-twitter-..
2024-01-17 17:56:45 +02:00
Slavi Pantaleev
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
Slavi Pantaleev
a9a1448f62
Add self-check for the matrix-corporal HTTP API (if enabled)
2024-01-13 15:29:47 +02:00
Slavi Pantaleev
5d76b91dc2
Restore matrix-corporal functionality when matrix-nginx-proxy is not involved
2024-01-13 15:29:47 +02:00
Slavi Pantaleev
11ee949e9e
Add native Traefik support to matrix-corporal (HTTP API)
2023-12-23 10:36:20 +02:00
Slavi Pantaleev
e47ad60cf5
Add support for additional networks to matrix-corporal
2023-12-23 09:33:56 +02:00
Slavi Pantaleev
cfea80b52a
Upgrade matrix-corporal (2.6.0 -> 2.7.0)
2023-12-15 22:20:09 +02:00
Slavi Pantaleev
2511b34a7c
Stop containers gracefully, instead of outright killing them
2023-12-06 11:52:23 +02:00
renovate[bot]
6192e81001
Update devture/matrix-corporal Docker tag to v2.6.0
2023-10-19 15:30:41 +00:00
Samuel Meenzen
c846ed199b
Annotate version numbers with renovate metadata
2023-10-06 14:14:03 +02:00
Slavi Pantaleev
ee4bac1988
Upgrade matrix-corporal (2.5.1 -> 2.5.2)
2023-03-16 18:29:11 +02:00
Slavi Pantaleev
dddfee16bc
Fix all 300+ ansible-lint-reported errors
2023-03-07 17:28:15 +02:00
Slavi Pantaleev
1abba4c918
Upgrade matrix-corporal (2.5.0 -> 2.5.1)
2023-01-02 14:39:54 +02:00
Slavi Pantaleev
86d177266a
Upgrade matrix-corporal (2.4.0 -> 2.5.0)
2022-12-11 18:29:13 +02:00
Slavi Pantaleev
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
Slavi Pantaleev
61f67d8f0a
Add install-* tags for quicker runs
2022-11-25 16:02:51 +02:00
Slavi Pantaleev
7c2a7a8eb6
Replace most import_tasks calls with include_tasks for improved performance
2022-11-24 11:33:45 +02:00
Slavi Pantaleev
0ea7cb5d18
Remove various init.yml files - initialize systemd services, etc., statically (not at runtime)
2022-11-23 11:45:46 +02:00
Slavi Pantaleev
e9e84341a9
Reverse-proxy to Synapse via matrix-synapse-reverse-proxy-companion
...
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2090
2022-11-20 16:43:33 +02:00
Slavi Pantaleev
d3bd1ca024
matrix_*_retries_{count,delay} -> devture_playbook_help_*_retries_{count,delay}
2022-11-04 16:44:29 +02:00
Slavi Pantaleev
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
Slavi Pantaleev
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
Slavi Pantaleev
835d2e9581
matrix_systemd_path -> devture_systemd_docker_base_systemd_path (via com.devture.ansible.role.systemd_docker_base)
2022-11-04 16:38:38 +02:00
Slavi Pantaleev
f03f716989
matrix_systemd_unit_home_path -> devture_systemd_docker_base_systemd_unit_home_path (via com.devture.ansible.role.systemd_docker_base)
2022-11-04 16:37:47 +02:00
Slavi Pantaleev
410a915a8a
Move roles/matrix* to roles/custom/matrix*
...
This paves the way for installing other roles into `roles/galaxy` using `ansible-galaxy`,
similar to how it's done in:
- https://github.com/spantaleev/gitea-docker-ansible-deploy
- https://github.com/spantaleev/nextcloud-docker-ansible-deploy
In the near future, we'll be removing a lot of the shared role code from here
and using upstream roles for it. Some of the core `matrix-*` roles have
already been extracted out into other reusable roles:
- https://github.com/devture/com.devture.ansible.role.postgres
- https://github.com/devture/com.devture.ansible.role.systemd_docker_base
- https://github.com/devture/com.devture.ansible.role.timesync
- https://github.com/devture/com.devture.ansible.role.vars_preserver
- https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages
- https://github.com/devture/com.devture.ansible.role.playbook_help
We just need to migrate to those.
2022-11-03 09:11:29 +02:00