Commit graph

20 commits

Author SHA1 Message Date
Slavi Pantaleev 1692a28fe4 Work around annoying Docker warning about undefined $HOME
> WARNING: Error loading config file: .dockercfg: $HOME is not defined

.. which appeared in Docker 20.10.
2021-01-15 00:23:01 +02:00
Slavi Pantaleev 05ca9357a8 Add .service suffix to systemd units list
We'll be adding `.timer` units later on, so it's good to be
more explicit.
2021-01-14 23:02:10 +02:00
Slavi Pantaleev d08b27784f Fix systemd services autostart problem with Docker 20.10
The Docker 19.04 -> 20.10 upgrade contains the following change
in `/usr/lib/systemd/system/docker.service`:

```
-BindsTo=containerd.service
-After=network-online.target firewalld.service containerd.service
+After=network-online.target firewalld.service containerd.service multi-user.target
-Requires=docker.socket
+Requires=docker.socket containerd.service
Wants=network-online.target
```

The `multi-user.target` requirement in `After` seems to be in conflict
with our `WantedBy=multi-user.target` and `After=docker.service` /
`Requires=docker.service` definitions, causing the following error on
startup for all of our systemd services:

> Job matrix-synapse.service/start deleted to break ordering cycle starting with multi-user.target/start

A workaround which appears to work is to add `DefaultDependencies=no`
to all of our services.
2020-12-10 11:43:20 +02:00
Slavi Pantaleev be5263f397 Move self-building git repository URLs to variables (stop hardcoding) 2020-11-28 21:34:14 +02:00
Slavi Pantaleev 5eed874199 Improve self-building experience (avoid conflict with pullable images)
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/716

This patch makes us use more fully-qualified container image names
(either prefixed with docker.io/ or with localhost/).

The latter happens when self-building is enabled.

We've recently had issues where if an image was removed manually
and the service was restarted (making `docker run` fetch it from Docker Hub, etc.),
we'd end up with a pulled image, even though we're aiming for a self-built one.
Re-running the playbook would then not do a rebuild, because:
- the image with that name already exists (even though it's something
else)
- we sometimes had conditional logic where we'd build only if the git
repo changed

By explicitly changing the name of the images (prefixing with localhost/),
we avoid such confusion and the possibility that we'd automatically pul something
which is not what we expect.

Also, I've removed that condition where building would happen on git
changes only. We now always build (unless an image with that name
already exists). We just force-build when the git repo changes.
2020-11-14 23:00:49 +02:00
Slavi Pantaleev 4dbec2470f Fix systemd_path being undefined breakage
Regression since #681 (Github Pull Request).

Fixes #715 (Github Issue).
2020-11-11 00:45:02 +02:00
Slavi Pantaleev 8782919d85 Ensure matrix_dynamic_dns_domain_configurations contains configurations
If `matrix_dynamic_dns_enabled`, we'd like to ensure there's at least
one configuration defined.

Related to #681 (Github Pull Request)
2020-11-10 23:49:36 +02:00
Slavi Pantaleev 97a7c8b0f0 Fix matrix_dynamic_dns_domain_configurations validation check
- `item` was undefined
- `'key' in configurations == ''` was doing the wrong thing

Related to #681 (Github Pull Request)
2020-11-10 23:49:36 +02:00
Slavi Pantaleev fef44b93d3 Define the matrix_dynamic_dns_domain_configurations variable in the role
Having it unset in the role itself (while referencign it) is a little strange.

Now people can look at the `roles/matrix-dynamic-dns/defaults/main.yml`
file and figure out everything that's necessary to run the role.

Related to #681 (Github Pull Request)
2020-11-10 23:49:36 +02:00
Scott Crossen 59bb6b2971 responded to reviewer comments 2020-11-09 13:32:58 -08:00
Scott Crossen e894befd87 Updates to reviewer comments 2020-11-07 17:53:13 -08:00
Scott Crossen 94dcceb7b9 removed intentional delay 2020-10-19 11:26:37 -07:00
Scott Crossen efeb651789 Removed typo 2020-10-19 11:25:01 -07:00
Scott Crossen e7d79a95dc removed platform-specific stuff 2020-10-19 10:46:02 -07:00
Scott Crossen 19721be8b1 removed dhcp option 2020-10-18 21:05:32 -07:00
Scott Crossen de1511b4bb Fixed valdiation 2020-10-16 21:31:07 -07:00
Scott Crossen 806f98447c Removed directory creation 2020-10-16 21:26:58 -07:00
Scott Crossen 51cca4c312 Added containerization 2020-10-16 21:21:58 -07:00
Scott Crossen 53bc7a77e1 fixed EOF issues 2020-10-13 16:47:09 -07:00
Scott Crossen 1f988969a5 Added role for dynamic dns 2020-10-13 16:26:57 -07:00