Commit Graph

80 Commits

Author SHA1 Message Date
44f2234c99 define matrix_admin in matrix-base 2022-06-27 10:34:04 +03:00
55d8e3dfdd mautrix-based bridges: add matrix_admin 2022-06-26 21:03:21 +03:00
7b0e5ef995 Update mautrix-whatsapp 0.4.0 -> 0.5.0 2022-06-16 14:55:11 +00:00
cebbe0beec whatsapp bridge: set the default log level to warning
Debug logs are inappropriate for production use.
2022-06-11 08:11:28 +02:00
6b94ccbcff whatsapp bridge: add matrix_mautrix_whatsapp_log_level
Fixes #1873
2022-06-11 08:09:57 +02:00
39914881a7 whatsapp bridge: disable logging to external files
The same logs still go to the systemd journal.
2022-06-11 07:56:22 +02:00
c05e78fc9a Fix string null in status_endpoint 2022-06-02 16:52:15 +02:00
c945f38c52 Merge pull request #1818 from paulRbr/bridge-mautrix-signal-encryption
Bridge mautrix signal and mautrix whatsapp encryption
2022-05-18 14:50:26 +02:00
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
e1e83353b4 bridge-whatsapp: add variable to enable end-to-bridge encryption 2022-05-18 13:14:22 +02:00
4297af5c51 Update mautrix-whatsapp v0.3.1 -> v0.4.0 2022-05-18 10:19:43 +00:00
3fbbd5a52c Update mautrix-whatsapp 0.3.0 -> 0.3.1 2022-04-17 14:07:50 +07:00
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
2022-04-14 08:52:37 +03:00
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".
2022-04-11 09:05:33 +03:00
41f948c48b Update mautrix-whatsapp 0.2.4 -> 0.3.0 2022-03-22 13:34:05 +01:00
2da3768b20 Added retries to the docker pulls (#1701) 2022-03-17 17:37:11 +02:00
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
338b4cebd2 bridge-mautrix-whatsapp: add option for creating non-federated rooms 2022-03-07 15:01:06 +01:00
fe389bd11a Changed to: mautrix-whatsapp v0.2.4 tag 2022-02-16 19:48:41 +02:00
819574b8ba Merge branch 'spantaleev:master' into master 2022-02-05 21:37:53 +01:00
7e5b88c3b7 fix: all praise the allmighty yamllinter 2022-02-05 21:32:54 +01:00
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
46f621bca6 Added: mautrix-whatsapp v0.2.3 tag 2022-01-17 09:58:16 +01:00
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
421b055cb5 Fix comment about matrix_mautrix_whatsapp_database_* variables
Was renamed in 087dbe4ddc

It is unclear to me if there is anything you actually need to adjust with these variables. It looks like that is done automatically in `matrix_servers`.
2021-12-08 04:09:09 -06:00
949ae80117 added server_map variable and renamed secret_map 2021-11-16 14:22:06 +01:00
b272e6147a Resolved server_map 2021-11-16 13:37:11 +01:00
3535c97117 updated whatsapp config 2021-11-15 19:25:08 +01:00
ae122466fc updated whatsapp config 2021-11-15 19:23:28 +01:00
4ff8fddd72 updated whatsapp config, backfill doesn't work 2021-11-14 23:57:52 +01:00
1d0e594def updated whatsapp config, backfill doesn't work 2021-11-14 23:45:07 +01:00
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
fb709152f3 Add self-building support for mautrix-whatsapp
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1322
2021-10-12 10:02:07 +03:00
7eec01e359 update mautrix new repo name 2021-08-18 17:21:20 +02:00
d2a1b8b134 whatsapp bridge has new docker image location
See https://github.com/mautrix/whatsapp/releases/tag/v0.1.8
2021-08-07 15:47:24 +02:00
dbae18fd6a feat: push ephemeral events to appservices
This adds https://github.com/matrix-org/matrix-doc/pull/2409 to the
appservice registrations, enabling synapse to push EDUs to appservices.
2021-03-25 18:49:54 +01:00
f9a0ec6fd1 Fix some bridges failing when Synapse workers enabled
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/904
2021-02-23 13:17:52 +02:00
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
e3290d8bcb Remove |to_json causing trouble
Fixes a regression introduced in f6097fbba1, which was cauing Synapse
to die with this error message:

> ValueError: sender_localpart needs characters which are not URL encoded.
2021-01-27 15:48:35 +02:00
f6097fbba1 E2BE not working for mautrix bridges
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/806
2021-01-27 15:43:33 +02:00
512f42aa76 Do not report docker kill/rm attempts as errors
These are just defensive cleanup tasks that we run.
In the good case, there's nothing to kill or remove, so they trigger an
error like this:

> Error response from daemon: Cannot kill container: something: No such container: something

and:

> Error: No such container: something

People often ask us if this is a problem, so instead of always having to
answer with "no, this is to be expected", we'd rather eliminate it now
and make logs cleaner.

In the event that:
- a container is really stuck and needs cleanup using kill/rm
- and cleanup fails, and we fail to report it because of error
suppression (`2>/dev/null`)

.. we'd still get an error when launching ("container name already in use .."),
so it shouldn't be too hard to investigate.
2021-01-27 10:22:46 +02:00
8549926395 Attempt to fix mautrix-whatsapp DB migration user table conflict
Discussed in https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/791
2021-01-15 17:13:47 +02:00
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
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
019a4d7dcd Use role relative paths for things 2020-12-23 11:34:48 +00:00
c5f8b1f61b Fix mautrix-whatsapp Postgres connection string to not use SSL by default 2020-12-23 11:40:22 +02:00
15f4cc924d Rename variables (_database_db_name -> _database_name) 2020-12-22 17:10:02 +02:00
13f84e2ad5 Enable automatic (SQLite -> Postgres) migration for matrix-mautrix-whatsapp 2020-12-14 16:21:01 +02:00
b9a04a7f95 Rename some remaining matrix_*_postgres_* vars back to matrix_*_database_*
Looks like there are some that I missed in 087dbe4ddc
2020-12-14 14:42:18 +02:00
087dbe4ddc Rename matrix_*_postgres_* back to matrix_*_database_*
I was thinking that it makes sense to be more specific,
and using `_postgres_` also separated these variables
from the `_database_` variables that ended up in bridge configuration.

However, @jdreichmann makes a good point
(https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/740#discussion_r542281102)
that we don't need to be so specific and can allow for other engines (like MySQL) to use these variables.
2020-12-14 13:02:47 +02:00