Commit graph

103 commits

Author SHA1 Message Date
Slavi Pantaleev be0c599565 Feed more slashes to mautrix bridges when using SQLite
This makes the `sqlite://` URI match what we were using before
and what the config expects.
2020-12-23 13:33:25 +02:00
Slavi Pantaleev 15f4cc924d Rename variables (_database_db_name -> _database_name) 2020-12-22 17:10:02 +02:00
Slavi Pantaleev 3ba8520266 Enable automatic (SQLite -> Postgres) migration for matrix-mautrix-hangouts 2020-12-14 16:18:38 +02:00
Slavi Pantaleev 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
Slavi Pantaleev 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
Slavi Pantaleev ce21ea3640 Add (Postgres + SQLite) support to matrix-mautrix-hangouts bridge
I don't use this bridge, so this is completely untested.
2020-12-14 12:34:59 +02:00
transcaffeine d9f4914e0d
WIP: postgres: create databases for all services
If a service is enabled, a database for it is created in postgres with a uniqque password. The service can then use this database for data storage instead of relying on sqlite.
2020-12-10 18:26:22 +01: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
Scott Crossen fa5d85426b Renamed systemd descriptions for all bridges 2020-10-13 16:40:30 -07:00
Slavi Pantaleev 19b9a1b16c Expose mautrix-hangouts port if matrix-nginx-proxy is disabled 2020-06-28 09:01:48 +03:00
Slavi Pantaleev 5da31ba579 Move configuration templates outside of defaults/main.yml files 2020-06-03 09:33:28 +03:00
Chris van Dijk 6334f6c1ea Remove hardcoded command paths in systemd unit files
Depending on the distro, common commands like sleep and chown may either
be located in /bin or /usr/bin.

Systemd added path lookup to ExecStart in v239, allowing only the
command name to be put in unit files and not the full path as
historically required. At least Ubuntu 18.04 LTS is however still on
v237 so we should maintain portability for a while longer.
2020-05-27 23:14:54 +02:00
Chris van Dijk 7585bcc4ac Allow the matrix user username and groupname to be configured separately
No migration steps should be required.
2020-05-01 19:59:32 +02:00
Slavi Pantaleev 4d260c0dd5 Add encryption configuration defaults to Mautrix bridges
Related to #451 (Github Issue).
2020-04-17 09:44:48 +03:00
Horvath Gergely 17e7bae2cc make selfbuild be forced on (and only) git master change 2020-04-06 18:42:15 +02:00
Slavi Pantaleev 3860709e19 Ensure matrix-mautrix-hangouts-db container is killed/removed 2020-03-25 18:03:45 +02:00
mooomooo eebc6e13f8 Made directory variables for /etc/systemd/system , /etc/cron.d , /usr/local/bin 2020-03-24 11:27:58 -07:00
Slavi Pantaleev 027056e027 Fix weird path creation
Fixes #403 (Github Issue).
2020-03-18 18:24:30 +02:00
Slavi Pantaleev 3cee815baf Fix some typos 2020-03-15 11:34:35 +02:00
Slavi Pantaleev 2b85fde103 Rename some variables for consistency 2020-03-15 10:15:27 +02:00
Slavi Pantaleev 8fe97abe7d Wire matrix_container_images_self_build to self_build variables via group_vars/matrix_servers
This keeps the roles cleaner and more independent of matrix-base,
which may be important for people building their own playbook
out of the individual roles and not using the matrix-base role.
2020-03-15 10:10:41 +02:00
Horvath Gergely 2d537484d5 introduce variable 2020-03-14 19:16:29 +01:00
Horvath Gergely 3c8535c3bc check ansible version for self-building in every role 2020-03-08 19:17:10 +01:00
Horvath Gergely a5d94eec0b refactor variable names 2020-03-08 00:28:14 +01:00
Horvath Gergely 310aa685f9 refactor based on Slavi's requests 2020-03-08 00:24:00 +01:00
Horvath Gergely f56825580d hangouts-bridge no-proxy warning does not trigger when 'matrix_nginx_proxy_enabled = false' is explicitly set 2020-02-24 08:59:10 +01:00
Horvath Gergely 40d0fea06c add mautrix-hangouts support for raspberry pi 2020-02-21 18:27:26 +01:00
Slavi Pantaleev bd38861179 Add support for automatic Double Puppeting for all Mautrix bridges 2020-01-12 20:28:36 +02:00
Slavi Pantaleev 53186ffa1c Sync configuration with upstream for all Mautrix bridges 2020-01-12 19:10:05 +02:00
Marcel Partap 7ead77fdb7 Remove spurious 'mxisd' string from mautrix bridge templates comment 2020-01-08 22:39:21 +01:00
Michael Haak 5b213e6ad0 Replace constructs appending elements with variables to matrix_synapse_container_extra_arguments. Fixes issue https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/304 2019-11-09 23:16:12 +01:00
Slavi Pantaleev 2ef8898421
Add comment 2019-08-21 07:14:31 +03:00
Slavi Pantaleev 97fb71d98c
Change privilege level 2019-08-21 07:12:46 +03:00
microchipster 122c3f1ec0 sync more chats in hangouts, switch to admin mode 2019-08-06 05:27:40 +00:00
microchipster 1e8d593f7a fix hangout displayname bug 2019-08-06 05:27:40 +00:00
microchipster 75785a0734 fix login url 2019-08-06 05:27:40 +00:00
microchipster 74d9eb1ec0 fix incorrect nginx proxy entry for hangouts bridge 2019-08-06 05:27:40 +00:00
microchipster 754c475338 matrix-hangouts/login instead of just /login 2019-08-06 05:27:40 +00:00
microchipster 95750c1bc7 attempt to inject nginx config for hangouts bridge 2019-08-06 05:27:40 +00:00
microchipster 264704a29e absorb Munfred changes 2019-08-06 05:27:40 +00:00
Eduardo Beltrame c1aea7c3fc Update validate_config.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame 85c7e9eb09 Update validate_config.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame 0a9ce65d3b Update validate_config.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame ad682f2180 Update main.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame ef9f6efd12 Update main.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame 451d84a981 Update main.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame da6d2e5621 Update main.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame b0f203b2ec Update main.yml 2019-08-06 05:27:40 +00:00
Eduardo Beltrame 4528e6402b add Publicly accessible base URL for the login endpoints.
# Auth server config
        auth:
            # Publicly accessible base URL for the login endpoints.
            # The prefix below is not implicitly added. This URL and all subpaths should be proxied
            # or otherwise pointed to the appservice's webserver to the path specified below (prefix).
            # This path should usually include a trailing slash.
            public: http://example.com/login/
            # Internal prefix in the appservice web server for the login endpoints.
            prefix: /login
2019-08-06 05:27:40 +00:00
Eduardo Beltrame 2d3fc98d18 Update main.yml 2019-08-06 05:27:40 +00:00
microchipster 0585889d5a add hangouts bridge by copying facebook bridge and find-replacing 2019-08-06 05:27:40 +00:00