Commit graph

49 commits

Author SHA1 Message Date
Shaleen Jain f674afe5e8
appservice: add and use homeserver_container_* vars (#2045)
* appservice: add and use matrix_homeserver_* vars

* appservice: use the new vars

* Apply suggestions from code review

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2022-08-24 08:38:12 +03:00
Slavi Pantaleev d073c7ecb3 More ansible-lint fixes 2022-07-18 13:01:19 +03:00
Slavi Pantaleev ddf18eadc7 More ansible-lint fixes 2022-07-18 13:01:17 +03:00
Slavi Pantaleev 34cdaade08 Use fully-qualified module names for builtin Ansible modules
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1939
2022-07-18 12:58:41 +03:00
Aine e149f33140
add/unify 'Project source code URL' link across all roles 2022-07-16 23:59:21 +03:00
Slavi Pantaleev 677a2fc503 Fix compatibility with ansible=6 / ansible-core=2.13
Details here: https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_6.html#id36

Basically:

```yaml
- name: Prior to 2.13
  debug:
    msg: '[1] + {{ [2] }}'

- name: 2.13 and forward
  debug:
    msg: '{{ [1] + [2] }}'
```

Interestingly, we had been using the new/safe syntax in lofs of places.

We were using the broken one in many others though. Hopefully all
instances were fixed by this patch.
2022-05-18 15:43:39 +03:00
Aine 2da3768b20
Added retries to the docker pulls (#1701) 2022-03-17 17:37:11 +02:00
Jim Myhrberg eeca3c8dca
fix: avoid yaml being wrapped at column 80 via to_nice_yaml
The `to_nice_yaml` helper will by default wrap any string YAML values on
the first space after column 80. This can in worst case yield invalid
YAML syntax. More details in Ansible's documentation here:

https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#formatting-data-yaml-and-json

In short, you need to explicitly provide a custom width argument of a
high number of some kind to avoid the line wrapping.
2022-03-16 01:10:26 +00:00
Marko Weltzer 819574b8ba
Merge branch 'spantaleev:master' into master 2022-02-05 21:37:53 +01:00
Marko Weltzer 7e5b88c3b7 fix: all praise the allmighty yamllinter 2022-02-05 21:32:54 +01:00
Slavi Pantaleev 86c36523df Replace ExecStopPost with ExecStop
Reverts b1b4ba501f, 90c9801c56, a3c84f78ca, ..

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.
2022-02-05 12:13:36 +02:00
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=
2022-01-04 17:27:25 +02:00
boris runakov d3a9ec98de refactoring 2021-11-16 21:03:21 +02:00
boris runakov 1ec67f49b0 replaced 8008 where possible 2021-11-15 22:43:05 +02:00
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.
2021-11-10 17:39:21 +02:00
benkuly 49cb2635a2
updated matrix-sms-bridge 2021-04-27 14:39:58 +02:00
Ahmad Haghighi e335f3fc77 rename matrix_global_registry to matrix_container_global_registry_prefix related to #990
Signed-off-by: Ahmad Haghighi <haghighi@fedoraproject.org>
2021-04-12 17:23:55 +04:30
Ahmad Haghighi f52a8b6484 use custom docker registry 2021-04-12 17:23:55 +04:30
rakshazi 2f887f292c
added "matrix_%SERVICE%_version" variable to all roles, use it in "matrix_%SERVICE%_docker_image" var (preserving backward-compatibility) 2021-02-20 19:08:28 +02:00
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
benkuly ad92c61fdd updated matrix-sms-bridge 2020-12-09 09:45:44 +01:00
benkuly f93a4f6474 updated matrix-sms-bridge 2020-11-27 16:01:24 +01:00
benkuly ff9a4e90c4 updated matrix-sms-bridge 2020-11-23 13:43:04 +01:00
benkuly 3a2e058f2e updated version of matrix-sms-bridge 2020-11-23 13:07:08 +01:00
benkuly f1ceb49ae2 fixed wrong path of truststore 2020-11-23 12:52:16 +01:00
benkuly ad1f0a01ce fixed systemd service typo 2020-11-23 12:49:28 +01:00
benkuly 76b0b9dc34 fixed application.yml loading 2020-11-23 12:48:08 +01:00
benkuly 2fb42dd7f1 fixed typo in truststore path 2020-11-23 12:38:17 +01:00
benkuly 4713e5d5f7 updated matrix-sms-bridge to 0.5.0 2020-11-23 12:30:39 +01:00
benkuly 8153e25d2d updated matrix-sms-bridge image 2020-11-16 13:59:03 +01:00
benkuly 787a9ef8ad updated matrix-sms-bridge image 2020-11-16 11:51:11 +01:00
benkuly 775b1ca7af updated matrix-sms-bridge image version 2020-11-15 12:12:44 +01:00
Slavi Pantaleev ccabc82d4c Use more fully-qualified container images
This is both for consistency with 93cc71cb69976c
and for making things more obvious.
2020-11-14 23:01:11 +02:00
benkuly c985e17f18 updated matrix-sms-bridge 2020-11-13 08:44:21 +01:00
Scott Crossen fa5d85426b Renamed systemd descriptions for all bridges 2020-10-13 16:40:30 -07:00
benkuly 7755e5efd4
Update sms-bridge (0.3.1 -> 0.3.2) 2020-07-30 16:25:07 +03:00
benkuly a1e248e0e1
updated matrix-sms-bridge (#581)
* updated matrix sms bridge container

* remove force pull

* updated matrix-sms-bridge container

* updated matrix-sms-bridge container

* updated version of matrix-sms-bridge

* updates matrix-sms-bridge
2020-07-14 14:02:34 +03:00
benkuly 3553d3d513 updated version of matrix-sms-bridge 2020-07-08 18:15:18 +03:00
benkuly 8e1a418a45 updated matrix-sms-bridge container 2020-07-08 18:15:18 +03:00
benkuly bd3223cdd4 updated matrix-sms-bridge container 2020-07-08 18:15:18 +03:00
benkuly 226d5a9c64 remove force pull 2020-07-08 18:15:18 +03:00
benkuly c5f9e02103 updated matrix sms bridge container 2020-07-08 18:15:18 +03:00
benkuly d49ee51035 remove force pull matrix-sms-bridge docker image 2020-06-12 10:23:51 +02:00
benkuly a0661a6012 updated sms bridge docker image 2020-06-12 08:37:08 +02:00
benkuly 11e53c4fbc add default region 2020-06-11 15:37:46 +02:00
benkuly 77fd23149b added gammu hard reset for sms modem 2020-06-06 08:28:08 +02:00
benkuly f68e47d3c4 renamed role matrix-sms-bridge to matrix-bridge-sms 2020-06-05 12:25:41 +02:00