themadprogramer
495dea194b
Merge attempt
3 lat temu
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.
3 lat temu
Slavi Pantaleev
8a609e5cf2
Fix some ansible-lint-reported errors
3 lat temu
Slavi Pantaleev
125ca5569d
Use unique filter for matrix_postgres_import_roles_to_ignore and matrix_postgres_import_databases_to_ignore
Dendrite uses a lot of databases, but a single (`dendrite`) role, which
leads to `matrix_postgres_import_roles_to_ignore` being something like
`['dendrite', 'dendrite', 'dendrite', ...]` needlessly.
This leads to weird regexes being generated for
`matrix_postgres_import_roles_ignore_regex`.
It's not that it hurts, but it just looks odd.
3 lat temu
Slavi Pantaleev
a4662660d2
Do not wait needlessly when vacuuming or importing Postgres
3 lat temu
Slavi Pantaleev
9fb21b89a8
Fix import-postgres/run-postgres-vacuum failures being suppressed
We were only reporting failures for when the async task didn't finish.
We also need to report a failure for when the task finished, but
returned a non-zero exit code.
3 lat temu
Slavi Pantaleev
7fb45a507d
Make --tags=run-postgres-vacuum and --tags=upgrade-postgres not assume Synapse
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2211
3 lat temu
Sebastian Gumprich
48388a3d96
use fqcns for some task
Signed-off-by: Sebastian Gumprich <github@gumpri.ch>
3 lat temu
Slavi Pantaleev
cb2fecbea9
Fix some ansible-lint-reported warnings
3 lat temu
Slavi Pantaleev
ff0fc88fae
Make Postgres import not break for databases with special names
We haven't encountered such a problem yet, but it doesn't hurt to
make things more robust.
3 lat temu
Slavi Pantaleev
0b44ec19b4
Do not override matrix_postgres_import_roles_to_ignore/matrix_postgres_import_databases_to_ignore in group_vars
These values that we were setting also make sense in the context of the
`matrix-postgres` role even when not used within the playbook.
3 lat temu
Slavi Pantaleev
e37e86eb1c
Fix 'could not save history to file "//.psql_history"' errors
3 lat temu
Slavi Pantaleev
bed9c18ab0
Pin Postgres version to 15.0
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2180
Just specifying `15` means we won't automatically re-pull `15.1` when it comes out.
3 lat temu
Slavi Pantaleev
af3a32cf6a
Fix Jinja2 interpolation for some default variables
We're overriding these in the correct way in `group_vars/matrix_servers`
so this wasn't causing any problem in practice.
3 lat temu
Slavi Pantaleev
a32eea41fe
Make roles/matrix-postgres/tasks/detect_existing_postgres_version.yml detect Postgres v14
3 lat temu
David Napier
2eef6af23e
Bump postgres version to newly released 15
3 lat temu
Slavi Pantaleev
881fdd28f0
Add support for Synapse container image customization
This allows people to augment the Synapse image with custom tools and
addons without having to rebuild it from scratch.
If customizations are enabled, the playbook will build a new
`localhost/matrixdotorg/synapse:VERSION-customized` image
on top of the default one (`FROM matrixdotorg/synapse:VERSION`)
and with custom Dockerfile build steps.
For servers that self-build the Synapse image, the Synapse image will be
built first, before proceding to extend it the same way.
In the future, we'll also have easy to enable Dockerfile build steps
for modules that the playbook supports.
3 lat temu
Slavi Pantaleev
62215a87fe
Upgrade Postgres minor versions (14.4 -> 14.5, 13.7 -> 13.8, etc.)
3 lat temu
Slavi Pantaleev
e6ecd54e72
Suppress some ansible-lint errors
3 lat temu
Slavi Pantaleev
a12cbeac3b
Fix async commands
Fixes a regression introduced in d1b5681ba0 .
Looks like `.finished` is a property on the main object, not on some
`.async_result` object.
3 lat temu
Slavi Pantaleev
d1b5681ba0
Report async task failures better
We were previously trying to reach into `.rc`,
but there's no such thing if `async_result.finished == 0`.
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2153
3 lat temu
Slavi Pantaleev
1ea1597020
Fix some ansible-lint-reported warnings
This mostly fixes `key-order` warnings around
`block` statements.
3 lat temu
Slavi Pantaleev
89648cf58e
Fix some ansible-lint-reported warnings
3 lat temu
Slavi Pantaleev
10a5b0d831
Add warnings about using Borg backup with external Postgres
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1982
3 lat temu
Slavi Pantaleev
7831dc91b3
Import tasks from other roles in a better way
One that doesn't trip up ansible-lint, causing `load-failure` errors.
3 lat temu
Slavi Pantaleev
c1849ae888
Fix the remaining var-spacing ansible-lint errors
Reference: https://ansible-lint.readthedocs.io/en/latest/default_rules/#var-spacing
3 lat temu
Slavi Pantaleev
1693c4ca1d
Fix no-changed-when ansible-lint errors
Reference: https://ansible-lint.readthedocs.io/en/latest/default_rules/#no-changed-when
3 lat temu
Slavi Pantaleev
bb8b8c4bf0
Fix tasks include regression
3 lat temu
Slavi Pantaleev
d073c7ecb3
More ansible-lint fixes
3 lat temu
Slavi Pantaleev
ddf18eadc7
More ansible-lint fixes
3 lat temu
Slavi Pantaleev
34cdaade08
Use fully-qualified module names for builtin Ansible modules
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1939
3 lat temu
Aine
e149f33140
add/unify 'Project source code URL' link across all roles
3 lat temu
Slavi Pantaleev
5963a387f0
Upgrade Postgres (14.3 -> 14.4)
4 lat temu
Aine
4109dc3bcd
Update Postgres (CVE-2022-1552 + last 9.x update)
CVE: https://security-tracker.debian.org/tracker/CVE-2022-1552
Source: https://www.postgresql.org/about/news/postgresql-143-137-1211-1116-and-1021-released-2449/
Postgres 9.6 upgrade (**not a CVE fix, 9.x still vulnerable**): https://www.postgresql.org/docs/release/9.6.24/
4 lat temu
Aine
1ee118bd49
matrix-change-user-admin-status: do not allocate tty
4 lat temu
Slavi Pantaleev
2df993977a
Ensure git cloning when self-building is done with the matrix user, not root
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1749
4 lat temu
Slavi Pantaleev
0364c6c634
Suppress old container cleanup (kill/rm) failures
People often report and ask about these "failures".
More-so previously, when the `docker kill/rm` output was collected,
but it still happens now when people do `systemctl status
matrix-something` and notice that it says "FAILURE".
Suppressing to avoid further time being wasted on saying "this is
expected".
4 lat temu
Aine
5f0ece0c28
fix permissions
4 lat temu
Aine
2da3768b20
Added retries to the docker pulls ( #1701 )
4 lat temu
Aine
701591e87e
Added retries to the docker pulls
4 lat temu
Slavi Pantaleev
d5de1e8352
Document that using an external Postgres server has serious downsides
Related to:
- https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1682
- https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1679
4 lat temu
GoMatrixHosting
28f6091ed4
GoMatrixHosting v0.7.0
4 lat temu
Aaron Raimist
f0e30c76f3
Postgres Minor Updates (14.2, 13.6, 12.10, 11.15, 10.20)
4 lat temu
Marko Weltzer
7e5b88c3b7
fix: all praise the allmighty yamllinter
4 lat temu
Slavi Pantaleev
86c36523df
Replace ExecStopPost with ExecStop
Reverts b1b4ba501fdfaa, 90c9801c560b6, a3c84f78ca9c65a, ..
I haven't really traced it (yet), but on some servers, I'm observing
`ansible-playbook ... --tags=start` completing very slowly, waiting
to stop services. I can't reproduce this on all Matrix servers I manage.
I suspect that either the systemd version is to blame or that some
specific service is not responding well to some `docker kill/rm` command.
`ExecStop` seems to work great in all cases and it's what we've been
using for a very long time, so I'm reverting to that.
4 lat temu
Slavi Pantaleev
b1b4ba501f
Replace ExecStop with ExecStopPost
ExecStopPost should allow us to clean up (docker kill + docker rm)
even if the ExecStart (docker run ..) command failed, and not just after
a graceful service stop was initiated.
Source: https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStopPost=
4 lat temu
Aaron Raimist
61b743f86d
Postgres Minor Updates (14.1, 13.5, 12.9, 11.14, 10.19)
4 lat temu
Slavi Pantaleev
c4d2c8394c
Abort if on an unsupported Postgres version (v9.6)
Official support ends today (2021-11-11).
Synapse still supports v9.6, but we'd better force users to transition
to newer versions anyway.
4 lat temu
Slavi Pantaleev
735c966ab6
Disable systemd services when stopping to uninstall them
Until now, we were leaving services "enabled"
(symlinks in /etc/systemd/system/multi-user.target.wants/).
We clean these up now. Broken symlinks may still exist in older
installations that enabled/disabled services. We're not taking care
to fix these up. It's just a cosmetic defect anyway.
4 lat temu
Patrick C. F. Ernzer
65182ea0f2
fixes #1365
docker-ce does not like quotes around the shm-size value
4 lat temu