Commit Graph
100 Commits
Author SHA1 Message Date
Slavi Pantaleev fe4c2d73f4 Update Ansible version requirements
Tests were carried out like this:

- `virtualenv3 env`
- `./env/bin/pip install ansible==4.10.0 ansible-core==2.11.7`
- `./env/bin/ansible-playbook .....`

The lowest version of `ansible-core` available on PyPI right now is
2.11.0. That version has trouble with `ansible==4.0.0` though.
The errors we were hitting seemed to be resolved by others online by
using `ansible==4.10.0` instead, which has a minimum `ansible-core`
requirement of `2.11.7`, so that's what we went with.

Older versions of Ansible may work, but.. I'm having trouble
installing them and don't want to spend too much time on digging through
ancient versions and testing them out. People should just learn to run
up-to-date software.
2022-11-26 16:45:07 +02:00
Slavi Pantaleev 16c18b0344 Upgrade Hydrogen (v0.3.4 -> v0.3.5) 2022-11-25 18:59:01 +02:00
Slavi Pantaleev fa523c6472 Remove blank lines 2022-11-25 17:36:42 +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 8456657f21 Announce install-* tags 2022-11-25 16:15:19 +02:00
Slavi Pantaleev 61f67d8f0a Add install-* tags for quicker runs 2022-11-25 16:02:51 +02:00
Slavi Pantaleev 34c01da9d2 Ensure consistent password_hash results regardless of whether crypt or passlib is used
Ansible recently started showing warnings about `crypt` being
deprecated. If one installs `passlib`, the `password_hash` values that
are generated would be different by default. With this patch, we ensure
consistency regardless of which one is used.

After this patch, password hashes (and UUIDs derived from them) will
change once, but they should be stable after that.

These hashes changing is not a problem, because the playbook
changes all references to the new values. Changes are only a problem if
they're done partially and with different tools.
For example:
- `--tags=setup-COMPONENT` with `passlib`
- `--tags=setup-postgres` with `crypt` (no `passlib`)
If so, the Postgres database password's value will differ for the
configuration generated for `COMPONENT`.

The `rounds=` value is arbitrary. It doesn't matter what it is,
as long as it's different than the default for `crypt` (5000)
and the default for `passlib` for `sha512` (656000).

Source (https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_filters.html):

> To ensure idempotency, specify rounds to be neither crypt’s nor passlib’s default, which is 5000 for crypt and a variable value (535000 for sha256, 656000 for sha512) for passlib
2022-11-25 11:41:16 +02:00
Slavi Pantaleev 42f3c3cbf6 Improve command for connecting to additional container networks 2022-11-25 10:22:25 +02:00
Slavi Pantaleev b59981f03c Remove incorrectly places task
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2297
2022-11-25 06:17:14 +02:00
Slavi Pantaleev 9c0cf5481a Try to be more helpful when matrix_homeserver_generic_secret_key appears to be undefined 2022-11-24 18:42:01 +02:00
Slavi Pantaleev 663a17ea10 Fix ansible-lint-reported errors 2022-11-24 17:39:34 +02:00
Slavi Pantaleev c37cf42427 Do not delete and re-create Synapse worker configs needlessly
We had checks to avoid stopping/deleting systemd services for workers
that used to exist and will continue to exist, but we were deleting
config files for workers each time.. Only to recreate them again later.

This lead to:

- too many misleading "changed" tasks
- too much unnecessary work
- potential failures during playbook execution possibly leaving the
  system in a bad state (no worker config files)
2022-11-24 17:06:31 +02:00
Slavi Pantaleev 2e7b5c7b02 Untangle the setup import/include mess in matrix-synapse 2022-11-24 16:27:11 +02:00
Slavi Pantaleev d29b0aeddb Replace even more import_tasks calls with include_tasks 2022-11-24 15:19:42 +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 PantaleevandGitHub 5c3df22c35 Merge pull request #2293 from jpdown/update-traefik-example
Add service declaration to sample traefik config
2022-11-24 08:11:34 +02:00
Slavi PantaleevandGitHub d9ab60fbf2 Merge pull request #2289 from etkecc/patch-126
Update grafana 9.2.5 -> 9.2.6
2022-11-23 18:06:55 +02:00
Slavi Pantaleev 787a82d6e8 Combine matrix user/group set_fact calls into one 2022-11-23 17:07:52 +02:00
Slavi Pantaleev 4d881477a3 Add matrix_homeserver_enabled variable
We need this to control whether `('matrix-' + matrix_homeserver_implementation + '.service')`
would get injected into `devture_systemd_service_manager_services_list_auto`
2022-11-23 16:56:39 +02:00
Slavi Pantaleev dd4f8df905 Remove unnecessary matrix_dendrite_role_executed 2022-11-23 16:15:33 +02:00
Slavi Pantaleev 8c180306ab Remove unnecessary matrix_conduit_role_executed 2022-11-23 16:14:59 +02:00
Slavi Pantaleev 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
Slavi Pantaleev 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
Slavi Pantaleev d829884642 Remove some old checks 2022-11-23 14:59:05 +02:00
Slavi Pantaleev 54cacc927e Upgrade com.devture.ansible.role.docker_sdk_for_python 2022-11-23 14:33:07 +02:00
Slavi Pantaleev 1bd3a27acd Do not try to enable non-enableable matrix_ssl_renewal_systemd_units_list 2022-11-23 13:00:15 +02:00
Slavi Pantaleev f696928b7d Fix variable typos 2022-11-23 12:18:35 +02:00
Slavi Pantaleev ccfaefa4d2 Add service groups 2022-11-23 11:45:47 +02:00
Slavi Pantaleev 93d4f8d425 Replace matrix-common-after systemd service management with com.devture.ansible.role.systemd_service_manager 2022-11-23 11:45:46 +02:00
Slavi Pantaleev eec5de7aba Remove old systemd service checks
These are not even caused by Archlinux, but by running buggy Ansible on old Ubuntu
while targeting modern servers (like Archlinux, but also others, ..).

We shouldn't employ ugly workarounds like this. We should tell people to
avoid running buggy Ansible or bad distros like Ubuntu, even.
2022-11-23 11:45:46 +02:00
Slavi Pantaleev 360e643f84 Add service priorities - try to stop/start them in an optimal order 2022-11-23 11:45:46 +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 PantaleevandGitHub 97ee2230a9 Merge pull request #2287 from etkecc/patch-125
Update element 1.11.14 -> 1.11.15
2022-11-23 07:07:13 +02:00
Slavi PantaleevandGitHub b4eb3b466f Merge pull request #2286 from array-in-a-matrix/stats
Add statistics reporting for dendrite
2022-11-22 19:11:35 +02:00
Slavi Pantaleev e37db0c888 Upgrade Synapse (v1.71.0 -> v1.72.0) 2022-11-22 16:41:14 +02:00
Slavi PantaleevandGitHub 4c711dcc7d Merge pull request #2285 from etkecc/fix-user-creator
fix user creator role
2022-11-22 16:26:59 +02:00
Slavi Pantaleev b90956069c Fix matrix_architecture sanity check 2022-11-22 09:25:29 +02:00
Slavi Pantaleev 6f865a7e0b Announce some playbook changes 2022-11-22 09:23:18 +02:00
Slavi Pantaleev 2ad6bd87c7 Determine matrix_architecture automatically 2022-11-22 09:22:56 +02:00
Slavi Pantaleev a98f249e40 Remove old cleanup tasks 2022-11-22 09:02:37 +02:00
Slavi Pantaleev d8f2141eb0 Install Docker via geerlingguy.docker Galaxy role 2022-11-22 09:01:26 +02:00
Slavi Pantaleev 7ac27becaf Upgrade ddclient (v3.10.0-ls103 -> v3.10.0-ls105) 2022-11-22 08:33:54 +02:00
Slavi PantaleevandGitHub 6d56a786a3 Merge pull request #2283 from array-in-a-matrix/patch-8
added dendrite config doc link
2022-11-21 08:06:10 +02:00
Slavi Pantaleev 433405d9d3 Try to fix ansible-lint Github action 2022-11-20 19:13:00 +02:00
Slavi Pantaleev 4ffb558b6d Pin ansible-community/ansible-lint-action version 2022-11-20 18:04:50 +02:00
Slavi Pantaleev e360b82e9b Try to fix ansible-lint Github action 2022-11-20 18:04:23 +02:00
Slavi Pantaleev 6a870a07b2 Fix ansible-lint-reported errors 2022-11-20 18:02:50 +02:00
Slavi Pantaleev 377e703746 Fixup Traefik example configuration
Related to e9e84341a9
2022-11-20 18:01:44 +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 424de93f82 Remove useless matrix_nginx_proxy_synapse_presence_disabled variable definition 2022-11-20 11:13:23 +02:00
Slavi PantaleevandGitHub 0365fea2fc Merge pull request #2279 from DennisCiba/master
Restructure the list of services in the README.md
2022-11-20 10:14:35 +02:00
Slavi PantaleevandGitHub 3e78d55c32 Merge pull request #2278 from etkecc/postmoogle-099
update postmoogle 0.9.8 -> 0.9.9
2022-11-19 09:08:03 +02:00
Slavi PantaleevandGitHub 049fdbfef6 Merge pull request #2277 from etkecc/patch-124
Update ntfy 1.29.0 -> 1.29.1
2022-11-18 08:48:32 +02:00
Slavi PantaleevandGitHub 15049d75cf Merge pull request #2275 from etkecc/patch-123
update prometheus 2.40.1 -> 2.40.2
2022-11-17 19:34:41 +02:00
Slavi PantaleevandGitHub 2b2eb290bd Merge pull request #2272 from etkecc/patch-122
Update grafana 9.2.4 -> 9.2.5
2022-11-16 22:22:11 +02:00
Slavi PantaleevandGitHub 3a053a26de Merge pull request #2262 from llasse/add-ma1sd-dockernetworks
added matrix_ma1sd_container_additional_networks
2022-11-16 15:44:35 +02:00
Slavi PantaleevandGitHub 28363dfee9 Merge pull request #2270 from etkecc/patch-121
Update mautrix-whatsapp 0.7.1 -> 0.7.2
2022-11-16 13:29:53 +02:00
Slavi PantaleevandGitHub 494d015e82 Merge pull request #2250 from felixx9/patch-4
add how to integrate
2022-11-16 11:56:34 +02:00
Slavi PantaleevandGitHub 9c2dedfdeb Reorganize a bit 2022-11-16 11:56:22 +02:00
Slavi Pantaleev 40e8ef0c70 Do not tell people to use latest Borgmatic - it won't help with Postgres v15
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2259#issuecomment-1312737960
2022-11-16 11:50:05 +02:00
Slavi PantaleevandGitHub 7a4918da15 Merge pull request #2269 from etkecc/patch-120
Update mautrix-googlechat 0.3.3 -> 0.4.0
2022-11-16 09:13:11 +02:00
Slavi PantaleevandGitHub a93308d190 Merge pull request #2266 from etkecc/patch-119
Update jitsi stable-7882 -> stable-8044
2022-11-15 18:01:39 +02:00
Slavi PantaleevandGitHub a8261cb108 Merge pull request #2265 from etkecc/patch-118
Update mautrix-facebook 0.4.0 -> 0.4.1
2022-11-15 18:01:11 +02:00
Slavi PantaleevandGitHub 943189a9aa Merge pull request #2259 from throny/patch-3
warn users about upgrading to pg15 when using borg
2022-11-13 08:54:32 +02:00
Slavi PantaleevandGitHub 4a229d6870 Merge pull request #2260 from etkecc/patch-117
Update ntfy 1.28.0 -> 1.29.0
2022-11-13 08:53:13 +02:00
Slavi PantaleevandGitHub 9b326e0899 Merge pull request #2254 from etkecc/patch-116
Update Hydrogen 0.3.3 -> 0.3.4
2022-11-10 21:55:38 +02:00
Slavi PantaleevandGitHub e760f163e5 Merge pull request #2251 from etkecc/patch-115
Update prometheus 2.40.0 -> 2.40.1
2022-11-09 18:15:10 +02:00
Slavi PantaleevandGitHub 0816b02365 Merge pull request #2252 from spantaleev/dependabot/github_actions/frenck/action-yamllint-1.3.1
Bump frenck/action-yamllint from 1.3.0 to 1.3.1
2022-11-09 18:11:48 +02:00
Slavi PantaleevandGitHub fa11d5af2b Merge pull request #2222 from array-in-a-matrix/master
Document login to Discord using token
2022-11-09 09:10:04 +02:00
Slavi Pantaleev 06df2df9e9 Mention playbook ownership issues when running Ansible in a container and potential workarounds
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2248
2022-11-09 09:01:58 +02:00
Slavi Pantaleev 32e5c814e4 Update containerized Ansible tag and make documentation about "make roles" clearer
`devture/ansible:2.13.6-r0` contains the `make` utility.
(https://github.com/devture/docker-ansible/commit/8597fd82720bf3aa1d1f3a6b9ea30ae45120e12f)

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2248
2022-11-09 08:46:49 +02:00
Slavi PantaleevandGitHub 702df4b5fe Merge pull request #2246 from etkecc/patch-114
Update element v1.11.13 -> v1.11.14
2022-11-08 20:35:33 +02:00
Slavi Pantaleev 51674887ff Fix Synapse pusher_instances not being populated correctly
This caused push notifications to be delivered more than once
if multiple `pusher` workers were enabled.
2022-11-08 17:40:44 +02:00
Slavi PantaleevandGitHub 59c6d37ebc Merge pull request #2245 from etkecc/patch-113
Update prometheus 2.39.1 -> 2.40.0
2022-11-08 16:54:49 +02:00
Slavi PantaleevandGitHub ed1d477ca2 Merge pull request #2244 from etkecc/patch-112
Update Grafana 9.2.3 -> 9.2.4
2022-11-08 16:54:33 +02:00
Slavi Pantaleev 7871a92b04 Upgrade Synapse (v1.70.1 -> v1.71.0) 2022-11-08 16:25:52 +02:00
Slavi PantaleevandGitHub 433adf097b Merge pull request #2240 from abmantis/patch-1
Remove repeated quote in mautrix-discord docs
2022-11-07 08:53:19 +02:00
Slavi PantaleevandGitHub a19f239f06 Merge pull request #2237 from etkecc/master
remove etherpad nginx config automatically
2022-11-05 21:28:18 +02:00
Slavi PantaleevandGitHub 844f05dcef Merge pull request #2235 from drelephant/fixgradle
stop gradle pacman error on ubuntu
2022-11-05 15:41:48 +02:00
Slavi PantaleevandGitHub 5fdcead744 Merge pull request #2233 from etkecc/etherpad-soffice-option
etherpad: add abiword and soffice config options, update log level
2022-11-05 14:28:58 +02:00
Slavi Pantaleev 663f0bc5ef Install openssl using ansible.builtin.package, not using a distro-specific package manager module
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2228
2022-11-05 12:10:59 +02:00
Slavi Pantaleev 5ef70015cb Ensure git is installed using ansible.builtin.package, not using a distro-specific package manager module
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2228
2022-11-05 12:09:32 +02:00
Slavi PantaleevandGitHub 13b63eabf0 Merge pull request #2229 from etkecc/make-etherpad-great-again
standalone etherpad
2022-11-05 11:54:51 +02:00
Slavi Pantaleev 805b70bfa3 Announce standalone Etherpad 2022-11-05 11:47:47 +02:00
Slavi Pantaleev 2473cd655b Include ensure_openssl_installed and ensure_fuse_installed utils in a more reliable way
This fixes a regression since the change done in c1c152f7ac.
When another role (say `matrix-jitsi`) included `roles/custom/matrix-base/tasks/util/ensure_openssl_installed.yml`,
which then included `{{ role_path }}/tasks/util/ensure_openssl_installed_DISTRO.yml`,
that `role_path` variable would end up being the parent role
(`matrix-jitsi`) and not the `matrix-base` role, so we'd get a failure.

An alternative solution may have been to avoid using `role_path`, but
importing roles properly (like we've done in this patch) sounds like a better way.

Unfortunately, `import_role` fails if `tasks_from` is something like
`util/ensure_openssl_installed` (containing a `/`), so I had to move
these utils out of `util/`.

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2228
2022-11-05 09:18:58 +02:00
Slavi Pantaleev c1c152f7ac Include potentially distro-specific tasks at runtime
This avoids Ansible trying to ensure `community.general.pacman` is
available, even if that module will never run (because `when` says so).

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2228
2022-11-05 08:31:22 +02:00
Slavi PantaleevandGitHub 264d1716e0 Merge pull request #2230 from etkecc/fix-workers-yaml-include-path
Keep Synapse worker definitions in vars.yml to avoid an extra file include on each playbook task
2022-11-05 07:45:13 +02:00
Slavi Pantaleev 6c524302d6 Add intentionally-ignored-endpoints to intentionally-ignored-endpoints for completeness 2022-11-05 07:40:56 +02:00
Slavi Pantaleev a9e2607d80 Fix yaml[comments-indentation] in workers config and remove automation 2022-11-05 07:29:47 +02:00
Slavi Pantaleev 7289992dba Document make roles some more
Improves:

- https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2232
- https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2217#issuecomment-1304366791
2022-11-05 07:10:04 +02:00
Slavi Pantaleev c165bf0a95 Try to make setup.yml more helpful when galaxy roles haven't been downloaded
With this change, trying to run the playbook should report an error that
looks like this:

> The offending line appears to be:
>
>     # Most of the roles below are not distributed with the playbook, but downloaded separately using `ansible-galaxy` via the `make roles` command (see `Makefile`).
>     - role: galaxy/com.devture.ansible.role.playbook_help
>       ^ here

.. with that comment included, which might help some people who missed
the `make roles` part.

Improves https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2232
2022-11-05 07:02:10 +02:00
Slavi Pantaleev 5ff59eb31a Upgrade com.devture.ansible.role.playbook_state_preserver 2022-11-05 06:56:10 +02:00
Slavi PantaleevandGitHub 043344fa4d Merge pull request #2231 from xyzst/update-dendrite-0.10.7
dendrite: update image tag to latest release (0.10.7)
2022-11-04 23:17:05 +02:00
Slavi Pantaleev a4e2a3bc07 Upgrade Hydrogen (v0.3.2 -> v0.3.3) 2022-11-04 17:07:29 +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 4f4c856e43 matrix_host_command_systemctl -> devture_systemd_docker_base_host_command_systemctl (via com.devture.ansible.role.systemd_docker_base) 2022-11-04 16:41:23 +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