Commit Graph

82 Commits

Author SHA1 Message Date
Aine
a541f51944
enable hookshot outbound webhooks 2024-09-25 15:25:31 +03:00
David Mehren
c89c356e53
Add a global config option for Docker network MTU (#3502)
* Add a global config option for Docker network MTU

* Upgrade systemd_docker_base (v1.2.0-0 -> v1.3.0-0)

The new version includes `devture_systemd_docker_base_container_networks_driver_options`
due to 3cc7d12396

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3502

* Switch from passing matrix_playbook_docker_network_mtu to respecting devture_systemd_docker_base_container_networks_driver_options

Related to:
- 3cc7d12396
- https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3502

* Update all roles to versions that respect `devture_systemd_docker_base_container_networks_driver_options`

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2024-09-18 16:20:27 +03:00
Samuel S
7d5e430ee9
Autocreate webhook in Gitlab instance with Hookshot bot (#3405)
* Add public url for gitlab hookshot to autocreate webhook on gitlab instance

* Add `noqa var-naming` comment to variable

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2024-07-08 18:12:03 +03:00
Slavi Pantaleev
4704a60718 Use a /webhook path for generic webhooks
By appending `/webhook` to the public URL (becoming `/hookshot/webhooks/webhook`)
and by only stripping the `/hookshot/webhooks` prefix,
we're effectively following what newer Hookshot versions advise
(see https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1681).

This change appears to be backward-compatible (old webhook URLs like `/hookshot/webhooks/:hookId` still work),
until Hookshot behavior changes.
2024-06-25 11:16:30 +03:00
Slavi Pantaleev
aafea6d259 Fix typo in comment for matrix_hookshot_container_labels_appservice_enabled 2024-06-25 11:01:09 +03:00
Slavi Pantaleev
ea22acc899 Fix Hookshot URL path generation regression
Regression since 7891268873,
where I removed the `matrix_hookshot_urlprefix` prefix group
`group_vars/matrix_servers`, thinking the value in `roles/custom/matrix-bridge-hookshot/defaults/main.yml`
was the same.

The value in `defaults/main.yml` incorrectly included `matrix_hookshot_public_endpoint`
in `matrix_hookshot_urlprefix`, which was leading to double-`/hookshot`-prefixing.

We were previously saved by the `matrix_hookshot_urlprefix` override in `group_vars/matrix_servers`.

This fix brings the correct URL prefix value (the one without `matrix_hookshot_public_endpoint`)
to `defaults/main.yml`.
2024-06-25 10:55:08 +03:00
renovate[bot]
9c9b2a8d38
chore(deps): update halfshot/matrix-hookshot docker tag to v5.4.1 2024-06-21 19:14:12 +00:00
renovate[bot]
d00410966f
chore(deps): update halfshot/matrix-hookshot docker tag to v5.4.0 2024-06-20 17:16:11 +00:00
Slavi Pantaleev
9f2eff2ac7 Respect devture_systemd_docker_base_docker_service_name
Related to 0241c71a4c

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3270#issuecomment-2143782962

With this change, it should be possible for people to adjust the Docker
dependency from `docker.service` to something else (e.g. `pkg-ContainerManager-dockerd.service`),
or to completely eliminate it by setting `devture_systemd_docker_base_docker_service_name` to an empty string.

This makes it easier for people to use the playbook against a Synology DSM server.
2024-06-04 13:14:34 +03:00
Slavi Pantaleev
7891268873 Do not hardcode https:// in all remaining places, refer to matrix_static_files_scheme
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3333
2024-05-25 16:14:26 +03:00
Kris Watson
b46085286e
Remove duplicate https from hookshot redirect_uri
matrix_hookshot_github_oauth_redirect_uri was adding an extra https in
front of matrix_hookshot_urlprefix, which already included that.
2024-05-08 10:33:30 -07:00
Aine
11b76bd0c2
fix redis port type
The conditional check 'matrix_hookshot_experimental_encryption_enabled and matrix_hookshot_cache_redisUri == ''' failed. The error was: An unhandled exception occurred while templating '{{ ('redis://' + matrix_hookshot_cache_redis_host + ':' + matrix_hookshot_cache_redis_port) if matrix_hookshot_cache_redis_host else '' }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Unexpected templating type error occurred on ({{ ('redis://' + matrix_hookshot_cache_redis_host + ':' + matrix_hookshot_cache_redis_port) if matrix_hookshot_cache_redis_host else '' }}): can only concatenate str (not \"int\") to str. can only concatenate str (not \"int\") to str
2024-04-25 22:49:01 +03:00
DevMiner
759d0fa7ed
fix(hookshot): incorrect Redis port
The default Redis port is 6379, not 6739.
2024-04-19 13:41:27 +02:00
Slavi Pantaleev
1774ed6e7d Make ansible-lint happy 2024-04-17 15:43:44 +03:00
Slavi Pantaleev
7d9eb0893e Switch Hookshot from queue.xxx to cache.redisUri
Related to:

- https://github.com/matrix-org/matrix-hookshot/pull/902
- https://github.com/matrix-org/matrix-hookshot/releases/tag/5.3.0
- https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3281
2024-04-17 15:36:49 +03:00
renovate[bot]
174dce2707
chore(deps): update halfshot/matrix-hookshot docker tag to v5.3.0 2024-04-17 11:50:51 +00:00
Slavi Pantaleev
3758b0cfeb Squashed commit of the following:
commit cf8637efaca0a0be3609fd6add0dff893a0a9194
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sun Mar 24 19:14:57 2024 +0200

    Make devture_systemd_docker_base_ipv6_enabled automatically reconfigure geerlingguy/ansible-role-docker

    Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3218

commit dc7af3bc7d25f321bf409477d823e43ea8a05803
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sun Mar 24 19:10:31 2024 +0200

    Replace matrix_ipv6_enabled with devture_systemd_docker_base_ipv6_enabled

    Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3218

commit 07e900d6a2926233a4fce34d9d8be292ff115260
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sun Mar 24 19:01:51 2024 +0200

    Improve matrix_ipv6_enabled comments

commit 3f03ca7f6983cb06b64607efef7a96b30c7def5b
Author: Tilo Spannagel <development@tilosp.de>
Date:   Sat Mar 9 19:27:50 2024 +0000

    Add setting to enable ipv6
2024-03-24 19:15:43 +02:00
renovate[bot]
c375d888e2
chore(deps): update halfshot/matrix-hookshot docker tag to v5.2.1 2024-02-21 18:24:09 +00:00
Slavi Pantaleev
90332f8c3d Fix problematic Hookshot redirect for /hookshot/widgetapi/v1/static
Hookshot wants a trailing slash for this route.

If we let Hookshot redirect, it goes to `/widgetapi/v1/static/`,
instead of `/hookshot/widgetapi/v1/static/`, so we take this matter into our
own hands.
2024-01-19 17:08:14 +02:00
Slavi Pantaleev
f953dd2cd6 Only strip /hookshot prefix for Hookshot widgetapi
Public URLs are like: `/hookshot/widgetapi/v1/static/`
.. which get translated to requests for: `/widgetapi/v1/static/`

Previously, we were stripping the whole `/hookshot/widgetapi` prefix,
which is wrong.
2024-01-19 17:02:16 +02:00
Slavi Pantaleev
51df34e7ae Ensure each container labels file defines at least one service
Most of these files were defining a service, usually toward the end.
These lines have been moved upward.

Some components (mautrix-signal, mautrix-gmessages, etc.) were defining
a service conditionally (only if metrics are exposed, etc). This was
causing issues like these in the Traefik logs:

> level=error msg="service \"matrix-mautrix-twitter\" error: port is missing" providerName=docker container=matrix-mautrix-twitter-..
2024-01-17 17:56:45 +02:00
Slavi Pantaleev
48a4afb114 Make Traefik labels files look better
This moves the comments from being just in Jinja,
to actually ending up in the generated `labels` file,
which makes inspection of the final result easier.

Also, some new lines were added here and there to make labels
more legible.

The generated file may still include weird new-lines due to
various `if` statements yielding content or not, but that's not so ugly
anymore - now that we have proper start/end sections that are visible in
the final `labels` file.
2024-01-15 10:41:15 +02:00
Slavi Pantaleev
aeb1bde4ab Remove matrix-nginx-proxy reference from matrix-bridge-hookshot 2024-01-14 12:06:05 +02:00
Slavi Pantaleev
23845c1d24 Remove matrix_docker_network references from matrix-bridge-hookshot 2024-01-13 17:18:22 +02:00
Slavi Pantaleev
ce2f541deb Switch all remaining container volume mounting from -v to --mount
`--mount` is safer, as `-v` has the side-effect of creating the "source"
destination as a directory if it doesn't exist yet.
We don't need such magic.
2024-01-11 12:16:27 +02:00
Slavi Pantaleev
4c7ee34194 Rename variable for consistency (matrix_hookshot_ident -> matrix_hookshot_identifier) 2024-01-09 09:56:21 +02:00
Slavi Pantaleev
7ec6fd3dfe Make bridges/bots use matrix_addons_homeserver_client_api_url (instead of matrix_homeserver_container_url) 2024-01-07 17:04:23 +02:00
Slavi Pantaleev
ab15991814 Fix some ansible-lint-reported errors 2024-01-04 13:00:46 +02:00
Slavi Pantaleev
46cbc2ead0 Merge branch 'master' into bye-bye-nginx-proxy 2024-01-03 13:09:55 +02:00
renovate[bot]
b2b6edc8a1
chore(deps): update halfshot/matrix-hookshot docker tag to v5.1.2 2024-01-02 19:23:48 +00:00
Slavi Pantaleev
77b0ef4799 Add Traefik support to Hookshot 2024-01-02 17:10:26 +02:00
Slavi Pantaleev
4a6287c528 Initial work on matrix-homeserver-proxy role and eliminating matrix-nginx-proxy
This is still very far from usable.

Various bridges and bots are still talking to
`matrix-nginx-proxy` instead of the new `matrix-homeserver-proxy` role.
These services need to be reworked. While reworking them,
various cleanups are being done as well as adding Traefik-labels to
those that need them.
2024-01-02 16:07:40 +02:00
renovate[bot]
bfd7fa4b95
chore(deps): update halfshot/matrix-hookshot docker tag to v5.1.1 2023-12-29 18:04:46 +00:00
renovate[bot]
9c7d0fb2ad
chore(deps): update halfshot/matrix-hookshot docker tag to v5.1.0 2023-12-29 15:06:26 +00:00
renovate[bot]
b2aa81a5ea
chore(deps): update halfshot/matrix-hookshot docker tag to v5 2023-12-28 01:27:08 +00:00
Slavi Pantaleev
ae983491e7 Add undefined matrix_hookshot_container_ident variable (and rename it to matrix_hookshot_ident)
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3042
2023-12-16 09:54:04 +02:00
Slavi Pantaleev
94c1503a60 Add support for experimental encryption in Hookshot
Squashed based on the work done in https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3042

commit 49932b8f3c17c4c4db7a884658c42f9a8b0550ca
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:21:31 2023 +0200

    Fix syntax in matrix-bridge-hookshot/tasks/reset_encryption.yml

    Also, this task always does work and side-effects, so it should always report changes
    (`changed_when: true`).

commit 6bdf7a9dcb73385313a1f34d52e27ad0cf95fb3e
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:12:41 2023 +0200

    Add Hookshot validation task to ensure queue settings are set when encryption is enabled

commit 8c531b7971b5dfd15ca541b5072b3eb8237cdcf9
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:10:17 2023 +0200

    Add missing variables rewiring in group_vars/matrix_servers for Hookshot

commit 7d26dabc2fe692f5e1236c0e250f85996f3fd0c2
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:08:19 2023 +0200

    Add defaults for matrix_hookshot_queue_host and matrix_hookshot_queue_port

commit 74f91138c92f1d1b69eb973803b882849e31a259
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:06:17 2023 +0200

    Fix syntax for connecting to additional networks for Hookshot

commit ca7b41f3f2d0c2900b2805294476f70e82461304
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:05:28 2023 +0200

    Fix indentation and remove unnecessary if-statements

commit ac4a918d58fc76e7332446a65609b56c5e4da00c
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:04:44 2023 +0200

    Add missing --network for Hookshot

    This seems to have been removed by accident.

commit 6a81fa208fca28951fc131cbf33b95ec78748a40
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:02:47 2023 +0200

    Make automatic Redis enabling safer, when Hookshot encryption enabled

    If we ever default encryption to enabled for Hookshot, we only wish to force-enable Redis if Hookshot is actually enabled.

commit 75a8e0f2a6cbf1562cb99c68ad1f20e4d47735ed
Author: Slavi Pantaleev <slavi@devture.com>
Date:   Sat Dec 16 09:01:10 2023 +0200

    Fix typo

commit 98ad182eaccc7ab457ead4e03cc0d4f2a525a47d
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:37:40 2023 +0100

    Add defaults for Hookshot's encryption

commit 29fa9fab151f513908d3e45882003da107a63c93
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:35:11 2023 +0100

    Improve wording of Hookshot's encryption section

commit 4f835e0560012754d7ce0b56619a97c68a297992
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:28:52 2023 +0100

    use safer mount options for the container's files

commit 8c93327e25c5e6af2442c676d5f264d4051c80e2
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:26:01 2023 +0100

    fix filename

commit 03a7bb6e7798dd95f7894311e4dd34dfa09f70fa
Merge: e55d7694 06047763
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:23:44 2023 +0100

    Merge branch 'HarHarLinks/hookshot-encryption' of https://github.com/real-joshua/matrix-docker-ansible-deploy into HarHarLinks/hookshot-encryption

commit 06047763bbd427dde117c6635ac7301198571158
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:15:54 2023 +0100

    Update roles/custom/matrix-bridge-hookshot/templates/config.yml.j2

    change the if statement to not require a variable with a length > 0 and add a filter to json for the redis host

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

commit e55d769465bd299081464e68d34851729d42d5ff
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:13:50 2023 +0100

    clarify that Redis is required, standardadise on Hookshot with an upper-case first letter for consistency

commit 66706e4535704deba63e5aa2102f324f9b14dae3
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 22:08:20 2023 +0100

    Update roles/custom/matrix-bridge-hookshot/templates/config.yml.j2

    fix for a typo

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

commit f6aaeb9a16f84409d31188e696885afed89fbdcc
Merge: e5d34002 869dd33f
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 00:22:34 2023 +0100

    Merge branch 'master' into HarHarLinks/hookshot-encryption

commit e5d34002fd6c39c3e18df04e20d0c8b25475db78
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Fri Dec 15 00:09:27 2023 +0100

    Add Jinja loop to allow adding multiple networks

commit 69f947782d6e072c3edc4ee4c7d5ccf69eccf3fd
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Thu Dec 14 23:52:41 2023 +0100

    split if statements for the message queue and experimental encryption support into seperate statements

commit 4c13be1c89ffb1b06475c7da546f7956e67b36a1
Author: Joshua Hoffmann <joshua.hoffmann@b1-systems.de>
Date:   Thu Dec 14 23:31:19 2023 +0100

    change variable name per spantaleev's suggestion (https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2979#discussion_r1379015551)

commit 9905309aa9448f91297f8c7618bf62682eee2af7
Author: HarHarLinks <kim.brose@rwth-aachen.de>
Date:   Wed Nov 1 16:14:04 2023 +0100

    amend docs

commit 94abf2d5bde63919c6b5597f3142eea5fed73815
Author: HarHarLinks <kim.brose@rwth-aachen.de>
Date:   Wed Nov 1 16:05:22 2023 +0100

    draft encryption support for hookshot
2023-12-16 09:23:35 +02:00
renovate[bot]
308b816d0c
Update halfshot/matrix-hookshot Docker tag to v4.7.0 2023-12-06 14:28:23 +00:00
Slavi Pantaleev
2511b34a7c Stop containers gracefully, instead of outright killing them 2023-12-06 11:52:23 +02:00
renovate[bot]
d6db0ef729
Update halfshot/matrix-hookshot Docker tag to v4.6.0 2023-11-20 19:04:00 +00:00
Samuel Meenzen
c846ed199b
Annotate version numbers with renovate metadata 2023-10-06 14:14:03 +02:00
Aine
676c380477
Update hookshot 4.5.0 -> 4.5.1 2023-09-26 18:45:32 +03:00
Aine
250a7845e9
Update hookshot 4.4.1 -> 4.5.0 2023-09-26 15:35:42 +03:00
Slavi Pantaleev
2a56fe09c3 Upgrade Hookshot (4.4.0 -> 4.4.1)
Related to: https://matrix.org/blog/2023/07/bridges-security-updates/
2023-07-31 18:41:52 +03:00
Aine
47b643f870
Update hookshot 4.3.0 -> 4.4.0 2023-06-28 21:55:31 +03:00
Slavi Pantaleev
0174840296 Upgrade Hookshot (4.2.0 -> 4.3.0) 2023-06-19 18:02:36 +03:00
Aine
0ce0a62eb7
Update hookshot 4.0.0 (4.1.0?) -> 4.2.0 2023-06-06 23:48:08 +03:00
Luke Moch
e4498f9568 Fix for hookshot validation failure 2023-06-02 06:23:30 -04:00
Slavi Pantaleev
e53c6c8020
Revert "Revert "Update hookshot 4.0.0 -> 4.1.0""
This reverts commit f98f803b44.

As the docker image has been released for this version we can now upgrade to this version
2023-06-01 02:13:27 +02:00
Slavi Pantaleev
f98f803b44 Revert "Update hookshot 4.0.0 -> 4.1.0"
This reverts commit 428f7a1f75.

Looks like it won't become a tagged image until a "release" is posted.
2023-05-26 10:17:20 +03:00