Compare commits

...

17 Commits

Author SHA1 Message Date
Slavi Pantaleev
aa612348bb
Merge pull request #3708 from luixxiul/fix
Update README.md and docs/configuring-playbook.md: add other unlisted services / container images
2024-10-31 14:37:23 +02:00
Suguru Hirahara
8db65bb811
Update README.md: add link to configuring-playbook-appservice-draupnir-for-all.md
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 21:09:02 +09:00
Suguru Hirahara
d200e8d084
Update README.md and docs/configuring-playbook.md: add configuring-playbook-prometheus-nginxlog.md
Since nginx has been replaced with traefik, the documentation is getting irrelevant anyway.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 21:07:18 +09:00
Suguru Hirahara
0a8dd90b5e
Update README.md: add matrix-appservice-kakaotalk
matrix-appservice-kakaotalk itself was added to the playbook with e46ba5debaf34ee6abc5e09c0e19ff5c666edc85. It also does not provide its container image.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 21:06:59 +09:00
Slavi Pantaleev
cb0ea1b23e
Merge pull request #3707 from luixxiul/fix
Add several components to README.md and docs/container-images.md
2024-10-31 12:56:50 +02:00
Suguru Hirahara
950147bc99
Update README.md and docs/container-images.md: add matrix-wechat
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 19:39:16 +09:00
Suguru Hirahara
748c38de30
Update README.md and docs/container-images.md: add mautrix-wsproxy
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 19:39:11 +09:00
Suguru Hirahara
f41d432ab2
Update README.md and docs/container-images.md: add mautrix-meta
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 19:39:03 +09:00
Suguru Hirahara
bff4321fb1
Update README.md and docs/container-images.md: add Matrix Authentication Service
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 19:38:50 +09:00
Suguru Hirahara
f6991b2db9
Update README.md and docs/container-images.md: add matrix-alertmanager-receiver
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 19:36:55 +09:00
Suguru Hirahara
0b09ad3d76
Update documentation about Slack bridges (#3706)
* Update docs/configuring-playbook-bridge-hookshot.md: matrix-appservice-webhooks has been deprecated

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Add notes that matrix-appservice-slack is not available for new installation

The bridge uses a classic Slack application, but its creation has been discontinued since June 4, 2024.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Remove reference to matrix-hookshot and matrix-appservice-webhooks

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

---------

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 11:58:04 +02:00
Slavi Pantaleev
c20fcedd2c Detect and remove legacy Postmoogle service (matrix-bot-postmoogle.service)
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3698
2024-10-31 10:55:32 +02:00
Slavi Pantaleev
e26fea0289 Fix validation task (matrix_postmoogle_ -> matrix_bot_postmoogle_)
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3698
2024-10-31 10:44:35 +02:00
Slavi Pantaleev
2234fbbb8a Fix Postmoogle service name file to match what is being deployed
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3698
2024-10-31 10:36:39 +02:00
Suguru Hirahara
652feba9cc
Rename variables of Postmoogle to handle it as a bridge (#3698)
* Rename variables matrix_bot_postmoogle_* with matrix_postmoogle_*

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Rename file names and references to those files

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Move variables block for /matrix-bridge-postmoogle

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Rename matrix_playbook_bot_postmoogle_ to matrix_playbook_bridge_postmoogle_

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Add matrix_playbook_migration_matrix_postmoogle_migration_validation_enabled

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Replace an install tag example with "-bot" prefix

The previous example seems to have been selected to show how components whose name contains "-bot-" needed to be specified.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

---------

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-10-31 10:33:46 +02:00
Slavi Pantaleev
fd39392ec5
Merge pull request #3705 from aine-etke/patch-175241
synapse-admin: v0.10.3-etke26
2024-10-31 10:23:23 +02:00
Aine
15ce998146
synapse-admin: v0.10.3-etke26 2024-10-31 10:19:32 +02:00
26 changed files with 524 additions and 460 deletions

View File

@ -1,3 +1,9 @@
# 2024-10-28
## (BC Break) Postmoogle's variable names need adjustments
Due to the recategorization of [Postmoogle](./docs/configuring-playbook-bridge-postmoogle.md) from the bot to the bridge, its variables were renamed (`matrix_bot_postmoogle_` -> `matrix_postmoogle_`). You need to adjust your `vars.yml` configuration accordingly.
# 2024-10-19
## Support for Matrix Authentication Service
@ -1310,7 +1316,7 @@ Recently, a few large optimizations have been done to this playbook and its exte
1. Replacing Ansible `import_tasks` calls with `include_tasks`, which decreased runtime in half. Using `import_tasks` is slower and causes Ansible to go through and skip way too many tasks (tasks which could have been skipped altogether by not having Ansible include them in the first place). On an experimental VM, **deployment time was decreased from ~530 seconds to ~250 seconds**.
2. Introducing new `install-*` tags (`install-all` and `install-COMPONENT`, e.g. `install-synapse`, `install-bot-postmoogle`), which only run Ansible tasks pertaining to installation, while skipping uninstallation tasks. In most cases, people are maintaining the same setup or they're *adding* new components. Removing components is rare. Running thousands of uninstallation tasks each time is wasteful. On an experimental VM, **deployment time was decreased from ~250 seconds (`--tags=setup-all`) to ~100 seconds (`--tags=install-all`)**.
2. Introducing new `install-*` tags (`install-all` and `install-COMPONENT`, e.g. `install-synapse`, `install-bot-mjolnir`), which only run Ansible tasks pertaining to installation, while skipping uninstallation tasks. In most cases, people are maintaining the same setup or they're *adding* new components. Removing components is rare. Running thousands of uninstallation tasks each time is wasteful. On an experimental VM, **deployment time was decreased from ~250 seconds (`--tags=setup-all`) to ~100 seconds (`--tags=install-all`)**.
You can still use `--tags=setup-all`. In fact, that's the best way to ensure your server is reconciled with the `vars.yml` configuration.

View File

@ -103,19 +103,23 @@ Bridges can be used to connect your Matrix installation with third-party communi
| [mautrix-telegram](https://github.com/mautrix/telegram) | x | Bridge to [Telegram](https://telegram.org/) | [Link](docs/configuring-playbook-bridge-mautrix-telegram.md) |
| [mautrix-gmessages](https://github.com/mautrix/gmessages) | x | Bridge to [Google Messages](https://messages.google.com/) | [Link](docs/configuring-playbook-bridge-mautrix-gmessages.md) |
| [mautrix-whatsapp](https://github.com/mautrix/whatsapp) | x | Bridge to [WhatsApp](https://www.whatsapp.com/) | [Link](docs/configuring-playbook-bridge-mautrix-whatsapp.md) |
| [mautrix-wsproxy](https://github.com/mautrix/wsproxy) | x | Bridge to Android SMS or Apple iMessage | [Link](docs/configuring-playbook-bridge-mautrix-wsproxy.md) |
| [mautrix-facebook](https://github.com/mautrix/facebook) | x | Bridge to [Facebook](https://facebook.com/) | [Link](docs/configuring-playbook-bridge-mautrix-facebook.md) |
| [mautrix-twitter](https://github.com/mautrix/twitter) | x | Bridge to [Twitter](https://twitter.com/) | [Link](docs/configuring-playbook-bridge-mautrix-twitter.md) |
| [mautrix-hangouts](https://github.com/mautrix/hangouts) | x | Bridge to [Google Hangouts](https://en.wikipedia.org/wiki/Google_Hangouts) | [Link](docs/configuring-playbook-bridge-mautrix-hangouts.md) |
| [mautrix-googlechat](https://github.com/mautrix/googlechat) | x | Bridge to [Google Chat](https://en.wikipedia.org/wiki/Google_Chat) | [Link](docs/configuring-playbook-bridge-mautrix-googlechat.md) |
| [mautrix-instagram](https://github.com/mautrix/instagram) | x | Bridge to [Instagram](https://instagram.com/) | [Link](docs/configuring-playbook-bridge-mautrix-instagram.md) |
| [mautrix-meta](https://github.com/mautrix/instagram) | x | Bridge to [Messenger](https://messenger.com/) and [Instagram](https://instagram.com/) | Link for [Messenger](docs/configuring-playbook-bridge-mautrix-meta-messenger.md) / [Instagram](docs/configuring-playbook-bridge-mautrix-meta-instagram.md) |
| [mautrix-signal](https://github.com/mautrix/signal) | x | Bridge to [Signal](https://www.signal.org/) | [Link](docs/configuring-playbook-bridge-mautrix-signal.md) |
| [beeper-linkedin](https://github.com/beeper/linkedin) | x | Bridge to [LinkedIn](https://www.linkedin.com/) | [Link](docs/configuring-playbook-bridge-beeper-linkedin.md) |
| [matrix-appservice-irc](https://github.com/matrix-org/matrix-appservice-irc) | x | Bridge to [IRC](https://wikipedia.org/wiki/Internet_Relay_Chat) | [Link](docs/configuring-playbook-bridge-appservice-irc.md) |
| [matrix-appservice-kakaotalk](https://src.miscworks.net/fair/matrix-appservice-kakaotalk) | x | Bridge to [Kakaotalk](https://www.kakaocorp.com/page/service/service/KakaoTalk?lang=ENG) | [Link](docs/configuring-playbook-bridge-appservice-kakaotalk.md) |
| [matrix-appservice-discord](https://github.com/matrix-org/matrix-appservice-discord) | x | Bridge to [Discord](https://discordapp.com/) | [Link](docs/configuring-playbook-bridge-appservice-discord.md) |
| [matrix-appservice-slack](https://github.com/matrix-org/matrix-appservice-slack) | x | Bridge to [Slack](https://slack.com/) | [Link](docs/configuring-playbook-bridge-appservice-slack.md) |
| [matrix-appservice-webhooks](https://github.com/turt2live/matrix-appservice-webhooks) | x | Bridge for slack compatible webhooks ([ConcourseCI](https://concourse-ci.org/), [Slack](https://slack.com/) etc. pp.) | [Link](docs/configuring-playbook-bridge-appservice-webhooks.md) |
| [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) | x | Bridge for generic webhooks and multiple project management services, such as GitHub, GitLab, Figma, and Jira in particular | [Link](docs/configuring-playbook-bridge-hookshot.md) |
| [matrix-sms-bridge](https://github.com/benkuly/matrix-sms-bridge) | x | Bridge to SMS | [Link](docs/configuring-playbook-bridge-matrix-bridge-sms.md) |
| [matrix-wechat](https://github.com/duo/matrix-wechat) | x | Bridge to [WeChat](https://www.wechat.com/) | [Link](docs/configuring-playbook-bridge-wechat.md) |
| [Heisenbridge](https://github.com/hifi/heisenbridge) | x | Bouncer-style bridge to [IRC](https://wikipedia.org/wiki/Internet_Relay_Chat) | [Link](docs/configuring-playbook-bridge-heisenbridge.md) |
| [go-skype-bridge](https://github.com/kelaresg/go-skype-bridge) | x | Bridge to [Skype](https://www.skype.com) | [Link](docs/configuring-playbook-bridge-go-skype-bridge.md) |
| [mx-puppet-slack](https://gitlab.com/mx-puppet/slack/mx-puppet-slack) | x | Bridge to [Slack](https://slack.com) | [Link](docs/configuring-playbook-bridge-mx-puppet-slack.md) |
@ -141,7 +145,7 @@ Bots provide various additional functionality to your installation.
| [Honoroit](https://github.com/etkecc/honoroit) | x | A helpdesk bot | [Link](docs/configuring-playbook-bot-honoroit.md) |
| [Go-NEB](https://github.com/matrix-org/go-neb) | x | A multi functional bot written in Go | [Link](docs/configuring-playbook-bot-go-neb.md) |
| [Mjolnir](https://github.com/matrix-org/mjolnir) | x | A moderation tool for Matrix | [Link](docs/configuring-playbook-bot-mjolnir.md) |
| [Draupnir](https://github.com/the-draupnir-project/Draupnir) | x | A moderation tool for Matrix (Fork of Mjolnir) | [Link](docs/configuring-playbook-bot-draupnir.md) |
| [Draupnir](https://github.com/the-draupnir-project/Draupnir) | x | A moderation tool for Matrix (Fork of Mjolnir) | [Link](docs/configuring-playbook-bot-draupnir.md) (for [appservice mode](docs/configuring-playbook-appservice-draupnir-for-all.md))|
| [Buscarron](https://github.com/etkecc/buscarron) | x | Web forms (HTTP POST) to Matrix | [Link](docs/configuring-playbook-bot-buscarron.md) |
| [matrix-chatgpt-bot](https://github.com/matrixgpt/matrix-chatgpt-bot) | x | ChatGPT from Matrix | [Link](docs/configuring-playbook-bot-chatgpt.md) |
@ -152,8 +156,10 @@ Services that help you in administrating and monitoring your Matrix installation
| Name | Default? | Description | Documentation |
| ---- | -------- | ----------- | ------------- |
| [matrix-alertmanager-receiver](https://github.com/metio/matrix-alertmanager-receiver) | x | Prometheus' [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) client | [Link](docs/configuring-playbook-alertmanager-receiver.md) |
| [Matrix Authentication Service](https://github.com/element-hq/matrix-authentication-service/) | x | OAuth 2.0 and OpenID Provider server | [Link](docs/configuring-playbook-matrix-authentication-service.md) |
| [synapse-admin](https://github.com/etkecc/synapse-admin) | x | A web UI tool for administrating users and rooms on your Matrix server | [Link](docs/configuring-playbook-synapse-admin.md) |
| Metrics and Graphs | x | Consists of the [Prometheus](https://prometheus.io) time-series database server, the Prometheus [node-exporter](https://prometheus.io/docs/guides/node-exporter/) host metrics exporter, and the [Grafana](https://grafana.com/) web UI | [Link](docs/configuring-playbook-prometheus-grafana.md) |
| Metrics and Graphs | x | Consists of the [Prometheus](https://prometheus.io) time-series database server, the Prometheus [node-exporter](https://prometheus.io/docs/guides/node-exporter/) host metrics exporter, and the [Grafana](https://grafana.com/) web UI, with [prometheus-nginxlog-exporter](https://github.com/martin-helmich/prometheus-nginxlog-exporter/) being available too | [Link](docs/configuring-playbook-prometheus-grafana.md) (for [prometheus-nginxlog-exporter](docs/configuring-playbook-prometheus-nginxlog.md)) |
| [Borg](https://borgbackup.org) | x | Backups | [Link](docs/configuring-playbook-backup-borg.md) |
| [rageshake](https://github.com/matrix-org/rageshake) | x | Bug report server | [Link](docs/configuring-playbook-rageshake.md) |
| [synapse-usage-exporter](https://github.com/loelkes/synapse-usage-exporter) | x | Export the usage statistics of a Synapse homeserver to be scraped by Prometheus. | [Link](docs/configuring-playbook-synapse-usage-exporter.md) |

View File

@ -1,6 +1,8 @@
# Setting up Appservice Slack bridging (optional)
**Note**: bridging to [Slack](https://slack.com) can also happen via the [mx-puppet-slack](configuring-playbook-bridge-mx-puppet-slack.md) and [mautrix-slack](configuring-playbook-bridge-mautrix-slack.md) bridges supported by the playbook.
**Notes**:
- Bridging to [Slack](https://slack.com) can also happen via the [mx-puppet-slack](configuring-playbook-bridge-mx-puppet-slack.md) and [mautrix-slack](configuring-playbook-bridge-mautrix-slack.md) bridges supported by the playbook.
- Currently (as of November, 2024) this component is not available for new installation unless you have already created a classic Slack application (which the bridge makes use of in order to enable bridging between Slack and Matrix), because the creation of classic Slack applications has been discontinued since June 4 2024. The author of the bridge claims [here](https://github.com/matrix-org/matrix-appservice-slack/issues/789#issuecomment-2172947787) that he plans to support the modern Slack application and until then "the best (and only) option for new installations is to use the webhook bridging".
The playbook can install and configure [matrix-appservice-slack](https://github.com/matrix-org/matrix-appservice-slack) for you.

View File

@ -6,7 +6,7 @@ Hookshot can bridge [Webhooks](https://en.wikipedia.org/wiki/Webhook) from softw
See the project's [documentation](https://matrix-org.github.io/matrix-hookshot/latest/hookshot.html) to learn what it does in detail and why it might be useful to you.
**Note**: the playbook also supports [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md), which however is soon to be archived by its author and to be replaced by hookshot.
**Note**: the playbook also supports [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md), which however was deprecated by its author.
## Setup Instructions

View File

@ -1,7 +1,7 @@
# Setting up Mautrix Slack bridging (optional)
**Note**: bridging to [Slack](https://slack.com/) can also happen via the [mx-puppet-slack](configuring-playbook-bridge-mx-puppet-slack.md) and [matrix-appservice-slack](configuring-playbook-bridge-appservice-slack.md) bridges supported by the playbook.
- For using as a Bot we recommend the [Appservice Slack](configuring-playbook-bridge-appservice-slack.md), because it supports plumbing.
- For using as a Bot we recommend the [Appservice Slack](configuring-playbook-bridge-appservice-slack.md), because it supports plumbing. Note that it is not available for new installation unless you have already created a classic Slack application, because the creation of classic Slack applications, which this bridge makes use of, has been discontinued.
- For personal use with a slack account we recommend the `mautrix-slack` bridge (the one being discussed here), because it is the most fully-featured and stable of the 3 Slack bridges supported by the playbook.
The playbook can install and configure [mautrix-slack](https://github.com/mautrix/slack) for you.

View File

@ -1,7 +1,6 @@
# Setting up MX Puppet Slack bridging (optional)
**Note**: bridging to [Slack](https://slack.com) can also happen via the
[matrix-appservice-slack](configuring-playbook-bridge-appservice-slack.md) and [mautrix-slack](configuring-playbook-bridge-mautrix-slack.md) bridges supported by the playbook.
**Note**: bridging to [Slack](https://slack.com) can also happen via the [matrix-appservice-slack](configuring-playbook-bridge-appservice-slack.md) and [mautrix-slack](configuring-playbook-bridge-mautrix-slack.md) bridges supported by the playbook. Note that `matrix-appservice-slack` is not available for new installation unless you have already created a classic Slack application, because the creation of classic Slack applications, which this bridge makes use of, has been discontinued.
The playbook can install and configure [mx-puppet-slack](https://gitlab.com/mx-puppet/slack/mx-puppet-slack) for you.

View File

@ -17,7 +17,7 @@ Open the following ports on your server to be able to receive incoming emails:
If you don't open these ports, you will still be able to send emails, but not receive any.
These port numbers are configurable via the `matrix_bot_postmoogle_smtp_host_bind_port` and `matrix_bot_postmoogle_submission_host_bind_port` variables, but other email servers will try to deliver on these default (standard) ports, so changing them is of little use.
These port numbers are configurable via the `matrix_postmoogle_smtp_host_bind_port` and `matrix_postmoogle_submission_host_bind_port` variables, but other email servers will try to deliver on these default (standard) ports, so changing them is of little use.
## Adjusting the playbook configuration
@ -25,17 +25,17 @@ These port numbers are configurable via the `matrix_bot_postmoogle_smtp_host_bin
Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
```yaml
matrix_bot_postmoogle_enabled: true
matrix_postmoogle_enabled: true
# Uncomment and adjust this part if you'd like to use a username different than the default
# matrix_bot_postmoogle_login: postmoogle
# matrix_postmoogle_login: postmoogle
# Generate a strong password here. Consider generating it with `pwgen -s 64 1`
matrix_bot_postmoogle_password: PASSWORD_FOR_THE_BOT
matrix_postmoogle_password: PASSWORD_FOR_THE_BOT
# Uncomment to add one or more admins to this bridge:
#
# matrix_bot_postmoogle_admins:
# matrix_postmoogle_admins:
# - '@yourAdminAccount:{{ matrix_domain }}'
#
# .. unless you've made yourself an admin of all bots/bridges like this:
@ -59,7 +59,7 @@ ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-use
- the `ensure-matrix-users-created` playbook tag makes the playbook automatically create a user account of the bridge's bot
- if you change the bridge's bot password (`matrix_bot_postmoogle_password` in your `vars.yml` file) subsequently, the bot user's credentials on the homeserver won't be updated automatically. If you'd like to change the bot user's password, use a tool like [synapse-admin](configuring-playbook-synapse-admin.md) to change it, and then update `matrix_bot_postmoogle_password` to let the bot know its new password
- if you change the bridge's bot password (`matrix_postmoogle_password` in your `vars.yml` file) subsequently, the bot user's credentials on the homeserver won't be updated automatically. If you'd like to change the bot user's password, use a tool like [synapse-admin](configuring-playbook-synapse-admin.md) to change it, and then update `matrix_postmoogle_password` to let the bot know its new password
## Usage
@ -74,10 +74,10 @@ You can also refer to the upstream [documentation](https://github.com/etkecc/pos
### Debug/Logs
As with all other services, you can find their logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by running something like `journalctl -fu matrix-bot-postmoogle`
As with all other services, you can find their logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by running something like `journalctl -fu matrix-postmoogle`
The default logging level for this bridge is `INFO`, but you can increase it to `DEBUG` with the following additional configuration:
```yaml
matrix_bot_postmoogle_loglevel: 'DEBUG'
matrix_postmoogle_loglevel: 'DEBUG'
```

View File

@ -41,6 +41,8 @@ When you're done with all the configuration you'd like to do, continue with [Ins
- [Enabling metrics and graphs (Prometheus, Grafana) for your Matrix server](configuring-playbook-prometheus-grafana.md) (optional)
- [Enabling metrics and graphs for NginX logs](docs/configuring-playbook-prometheus-nginxlog.md) (optional)
- [Enabling synapse-usage-exporter for Synapse usage statistics](configuring-playbook-synapse-usage-exporter.md) (optional)
### Core service adjustments

View File

@ -50,6 +50,8 @@ These services are not part of our default installation, but can be enabled by [
- [mautrix/whatsapp](https://mau.dev/mautrix/whatsapp/container_registry) - the [mautrix-whatsapp](https://github.com/mautrix/whatsapp) bridge to [Whatsapp](https://www.whatsapp.com/) (optional)
- [mautrix/wsproxy](https://mau.dev/mautrix/wsproxy/container_registry) - the [mautrix-wsproxy](https://github.com/mautrix/wsproxy) bridge to Android SMS or Apple iMessage (optional)
- [mautrix/facebook](https://mau.dev/mautrix/facebook/container_registry) - the [mautrix-facebook](https://github.com/mautrix/facebook) bridge to [Facebook](https://facebook.com/) (optional)
- [mautrix/twitter](https://mau.dev/mautrix/twitter/container_registry) - the [mautrix-twitter](https://github.com/mautrix/twitter) bridge to [Twitter](https://twitter.com/) (optional)
@ -60,6 +62,8 @@ These services are not part of our default installation, but can be enabled by [
- [mautrix/instagram](https://mau.dev/mautrix/instagram/container_registry) - the [mautrix-instagram](https://github.com/mautrix/instagram) bridge to [Instagram](https://instagram.com/) (optional)
- [mautrix/meta](https://mau.dev/mautrix/meta/container_registry) - the [mautrix-meta](https://github.com/mautrix/meta) bridge to [Messenger](https://messenger.com/) and [Instagram](https://instagram.com/) (optional)
- [mautrix/signal](https://mau.dev/mautrix/signal/container_registry) - the [mautrix-signal](https://github.com/mautrix/signal) bridge to [Signal](https://www.signal.org/) (optional)
- [matrixdotorg/matrix-appservice-irc](https://hub.docker.com/r/matrixdotorg/matrix-appservice-irc) - the [matrix-appservice-irc](https://github.com/matrix-org/matrix-appservice-irc) bridge to [IRC](https://wikipedia.org/wiki/Internet_Relay_Chat) (optional)
@ -72,6 +76,8 @@ These services are not part of our default installation, but can be enabled by [
- [folivonet/matrix-sms-bridge](https://hub.docker.com/repository/docker/folivonet/matrix-sms-bridge) - the [matrix-sms-bridge](https://github.com/benkuly/matrix-sms-bridge) (optional)
- [lxduo/matrix-wechat](https://hub.docker.com/r/lxduo/matrix-wechat) - the [matrix-wechat](https://github.com/duo/matrix-wechat) bridge to WeChat (optional)
- [mx-puppet/discord/mx-puppet-discord](https://gitlab.com/mx-puppet/discord/mx-puppet-discord/container_registry) - the [mx-puppet-discord](https://gitlab.com/mx-puppet/discord/mx-puppet-discord) bridge to [Discord](https://discordapp.com) (optional)
- [mx-puppet/slack/mx-puppet-slack](https://gitlab.com/mx-puppet/slack/mx-puppet-slack/container_registry) - the [mx-puppet-slack](https://gitlab.com/mx-puppet/slack/mx-puppet-slack) bridge to [Slack](https://slack.com) (optional)
@ -110,6 +116,10 @@ These services are not part of our default installation, but can be enabled by [
- [gnuxie/draupnir](https://hub.docker.com/r/gnuxie/draupnir) - the [Draupnir](https://github.com/the-draupnir-project/Draupnir/) moderation bot (optional)
- [metio/matrix-alertmanager-receiver](https://hub.docker.com/r/metio/matrix-alertmanager-receiver) - the [matrix-alertmanager-receiver](https://github.com/metio/matrix-alertmanager-receiver) client for Prometheus' [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) (optional)
- [element-hq/matrix-authentication-service](https://ghcr.io/element-hq/matrix-authentication-service) - [matrix-authentication-service](https://github.com/element-hq/matrix-authentication-service) (MAS) OAuth 2.0 and OpenID Provider server (optional)
- [etke.cc/synapse-admin](https://ghcr.io/etkecc/synapse-admin) - the [etkecc/synapse-admin](https://github.com/etkecc/synapse-admin) (a [feature-rich](https://github.com/etkecc/synapse-admin#fork-differences) fork of [Awesome-Technologies/synapse-admin](https://github.com/Awesome-Technologies/synapse-admin) web UI tool for administrating users and rooms on your Matrix server (optional)
- [prom/prometheus](https://hub.docker.com/r/prom/prometheus/) - [Prometheus](https://github.com/prometheus/prometheus/) is a systems and service monitoring system

View File

@ -19,9 +19,9 @@ Here are some playbook tags that you should be familiar with:
- `install-all` - like `setup-all`, but skips uninstallation tasks. Useful for maintaining your setup quickly when its components remain unchanged. If you adjust your `vars.yml` to remove components, you'd need to run `setup-all` though, or these components will still remain installed
- `setup-SERVICE` (e.g. `setup-bot-postmoogle`) - runs the setup tasks only for a given role, but does not start/restart services. You can discover these additional tags in each role (`roles/**/tasks/main.yml`). Running per-component setup tasks is **not recommended**, as components sometimes depend on each other and running just the setup tasks for a given component may not be enough. For example, setting up the [mautrix-telegram bridge](configuring-playbook-bridge-mautrix-telegram.md), in addition to the `setup-mautrix-telegram` tag, requires database changes (the `setup-postgres` tag) as well as reverse-proxy changes (the `setup-nginx-proxy` tag).
- `setup-SERVICE` (e.g. `setup-postmoogle`) - runs the setup tasks only for a given role, but does not start/restart services. You can discover these additional tags in each role (`roles/**/tasks/main.yml`). Running per-component setup tasks is **not recommended**, as components sometimes depend on each other and running just the setup tasks for a given component may not be enough. For example, setting up the [mautrix-telegram bridge](configuring-playbook-bridge-mautrix-telegram.md), in addition to the `setup-mautrix-telegram` tag, requires database changes (the `setup-postgres` tag) as well as reverse-proxy changes (the `setup-nginx-proxy` tag).
- `install-SERVICE` (e.g. `install-bot-postmoogle`) - like `setup-SERVICE`, but skips uninstallation tasks. See `install-all` above for additional information.
- `install-SERVICE` (e.g. `install-postmoogle`) - like `setup-SERVICE`, but skips uninstallation tasks. See `install-all` above for additional information.
- `start` - starts all systemd services and makes them start automatically in the future

View File

@ -293,8 +293,6 @@ devture_systemd_service_manager_services_list_auto: |
+
([{'name': 'matrix-bot-draupnir.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'draupnir', 'bot-draupnir']}] if matrix_bot_draupnir_enabled else [])
+
([{'name': 'matrix-bot-postmoogle.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'postmoogle', 'bot-postmoogle']}] if matrix_bot_postmoogle_enabled else [])
+
([{'name': 'matrix-bot-chatgpt.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'chatgpt', 'bot-chatgpt']}] if matrix_bot_chatgpt_enabled else [])
+
([{'name': 'matrix-appservice-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-discord']}] if matrix_appservice_discord_enabled else [])
@ -365,6 +363,8 @@ devture_systemd_service_manager_services_list_auto: |
+
([{'name': 'matrix-mx-puppet-twitter.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-twitter']}] if matrix_mx_puppet_twitter_enabled else [])
+
([{'name': 'matrix-postmoogle.service', 'priority': 2200, 'groups': ['matrix', 'bridges', 'postmoogle']}] if matrix_postmoogle_enabled else [])
+
([{'name': 'matrix-sms-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'sms']}] if matrix_sms_bridge_enabled else [])
+
([{'name': 'matrix-cactus-comments.service', 'priority': 2000, 'groups': ['matrix', 'cactus-comments']}] if matrix_cactus_comments_enabled else [])
@ -2571,6 +2571,81 @@ matrix_mx_puppet_groupme_database_password: "{{ '%s' | format(matrix_homeserver_
#
######################################################################
######################################################################
#
# matrix-bridge-postmoogle
#
######################################################################
# We don't enable bridges by default.
matrix_postmoogle_enabled: false
matrix_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
matrix_postmoogle_ssl_path: |-
{{
{
'playbook-managed-traefik': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
'other-traefik-container': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
matrix_playbook_bridge_postmoogle_traefik_tls_cert: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
matrix_playbook_bridge_postmoogle_traefik_key: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
matrix_postmoogle_tls_cert: |-
{{
{
'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
matrix_postmoogle_tls_key: |-
{{
{
'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services: "{% for domain in matrix_postmoogle_domains %}{{ traefik_certs_dumper_identifier }}-wait-for-domain@{{ domain }}.service {% endfor %}"
matrix_postmoogle_systemd_required_services_list_auto: |
{{
matrix_addons_homeserver_systemd_services_list
+
([postgres_identifier ~ '.service'] if postgres_enabled and matrix_postmoogle_database_hostname == matrix_postmoogle_database_hostname else [])
+
(matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services | trim | split(' ') if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled else [])
}}
# Postgres is the default, except if not using internal Postgres server
matrix_postmoogle_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
matrix_postmoogle_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
matrix_postmoogle_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'postmoogle.db', rounds=655555) | to_uuid }}"
matrix_postmoogle_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
matrix_postmoogle_container_network: "{{ matrix_addons_container_network }}"
matrix_postmoogle_container_additional_networks_auto: |-
{{
(
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
+
([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
) | unique
}}
######################################################################
#
# /matrix-bridge-postmoogle
#
######################################################################
######################################################################
#
@ -2855,84 +2930,6 @@ matrix_bot_baibot_container_additional_networks_auto: |-
#
######################################################################
######################################################################
#
# matrix-bot-postmoogle
#
######################################################################
# We don't enable bots by default.
matrix_bot_postmoogle_enabled: false
matrix_bot_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
matrix_bot_postmoogle_ssl_path: |-
{{
{
'playbook-managed-traefik': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
'other-traefik-container': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
matrix_playbook_bot_postmoogle_traefik_tls_cert: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
matrix_playbook_bot_postmoogle_traefik_key: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
matrix_bot_postmoogle_tls_cert: |-
{{
{
'playbook-managed-traefik': (matrix_playbook_bot_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
'other-traefik-container': (matrix_playbook_bot_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
matrix_bot_postmoogle_tls_key: |-
{{
{
'playbook-managed-traefik': (matrix_playbook_bot_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
'other-traefik-container': (matrix_playbook_bot_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
'none': '',
}[matrix_playbook_reverse_proxy_type]
}}
matrix_playbook_bot_postmoogle_traefik_certs_dumper_waiter_services: "{% for domain in matrix_bot_postmoogle_domains %}{{ traefik_certs_dumper_identifier }}-wait-for-domain@{{ domain }}.service {% endfor %}"
matrix_bot_postmoogle_systemd_required_services_list_auto: |
{{
matrix_addons_homeserver_systemd_services_list
+
([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_postmoogle_database_hostname == matrix_bot_postmoogle_database_hostname else [])
+
(matrix_playbook_bot_postmoogle_traefik_certs_dumper_waiter_services | trim | split(' ') if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled else [])
}}
# Postgres is the default, except if not using internal Postgres server
matrix_bot_postmoogle_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
matrix_bot_postmoogle_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
matrix_bot_postmoogle_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'postmoogle.db', rounds=655555) | to_uuid }}"
matrix_bot_postmoogle_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
matrix_bot_postmoogle_container_network: "{{ matrix_addons_container_network }}"
matrix_bot_postmoogle_container_additional_networks_auto: |-
{{
(
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
+
([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
) | unique
}}
######################################################################
#
# /matrix-bot-postmoogle
#
######################################################################
######################################################################
#
# matrix-bot-chatgpt
@ -4054,10 +4051,10 @@ postgres_managed_databases_auto: |
}] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == postgres_connection_hostname) else [])
+
([{
'name': matrix_bot_postmoogle_database_name,
'username': matrix_bot_postmoogle_database_username,
'password': matrix_bot_postmoogle_database_password,
}] if (matrix_bot_postmoogle_enabled and matrix_bot_postmoogle_database_engine == 'postgres' and matrix_bot_postmoogle_database_hostname == postgres_connection_hostname) else [])
'name': matrix_postmoogle_database_name,
'username': matrix_postmoogle_database_username,
'password': matrix_postmoogle_database_password,
}] if (matrix_postmoogle_enabled and matrix_postmoogle_database_engine == 'postgres' and matrix_postmoogle_database_hostname == postgres_connection_hostname) else [])
+
([{
'name': matrix_bot_maubot_database_name,
@ -4950,8 +4947,8 @@ matrix_synapse_admin_config_asManagedUsers_auto: |
] if matrix_bot_maubot_enabled else [])
+
([
'^@'+(matrix_bot_postmoogle_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
] if matrix_bot_postmoogle_enabled else [])
'^@'+(matrix_postmoogle_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
] if matrix_postmoogle_enabled else [])
+
([
'^@_discord_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
@ -5775,10 +5772,10 @@ matrix_user_creator_users_auto: |
}] if matrix_bot_honoroit_enabled else [])
+
([{
'username': matrix_bot_postmoogle_login,
'initial_password': matrix_bot_postmoogle_password,
'username': matrix_postmoogle_login,
'initial_password': matrix_postmoogle_password,
'initial_type': 'bot',
}] if matrix_bot_postmoogle_enabled else [])
}] if matrix_postmoogle_enabled else [])
+
([{
'username': matrix_bot_buscarron_login,

View File

@ -1,179 +0,0 @@
---
# postmoogle is an email to Matrix bridge using its bot user
# Project source code URL: https://github.com/etkecc/postmoogle
matrix_bot_postmoogle_enabled: true
matrix_bot_postmoogle_container_image_self_build: false
matrix_bot_postmoogle_docker_repo: "https://github.com/etkecc/postmoogle.git"
matrix_bot_postmoogle_docker_repo_version: "{{ 'main' if matrix_bot_postmoogle_version == 'latest' else matrix_bot_postmoogle_version }}"
matrix_bot_postmoogle_docker_src_files_path: "{{ matrix_base_data_path }}/postmoogle/docker-src"
# renovate: datasource=docker depName=ghcr.io/etkecc/postmoogle
matrix_bot_postmoogle_version: v0.9.23
matrix_bot_postmoogle_docker_image: "{{ matrix_bot_postmoogle_docker_image_name_prefix }}etkecc/postmoogle:{{ matrix_bot_postmoogle_version }}"
matrix_bot_postmoogle_docker_image_name_prefix: "{{ 'localhost/' if matrix_bot_postmoogle_container_image_self_build else 'ghcr.io/' }}"
matrix_bot_postmoogle_docker_image_force_pull: "{{ matrix_bot_postmoogle_docker_image.endswith(':latest') }}"
matrix_bot_postmoogle_base_path: "{{ matrix_base_data_path }}/postmoogle"
matrix_bot_postmoogle_config_path: "{{ matrix_bot_postmoogle_base_path }}/config"
matrix_bot_postmoogle_data_path: "{{ matrix_bot_postmoogle_base_path }}/data"
matrix_bot_postmoogle_container_network: ""
matrix_bot_postmoogle_container_additional_networks: "{{ matrix_bot_postmoogle_container_additional_networks_auto + matrix_bot_postmoogle_container_additional_networks_custom }}"
matrix_bot_postmoogle_container_additional_networks_auto: []
matrix_bot_postmoogle_container_additional_networks_custom: []
# A list of extra arguments to pass to the container
matrix_bot_postmoogle_container_extra_arguments: []
# List of systemd services that matrix-bot-postmoogle.service depends on
matrix_bot_postmoogle_systemd_required_services_list: "{{ matrix_bot_postmoogle_systemd_required_services_list_default + matrix_bot_postmoogle_systemd_required_services_list_auto + matrix_bot_postmoogle_systemd_required_services_list_custom }}"
matrix_bot_postmoogle_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
matrix_bot_postmoogle_systemd_required_services_list_auto: []
matrix_bot_postmoogle_systemd_required_services_list_custom: []
# List of systemd services that matrix-bot-postmoogle.service wants
matrix_bot_postmoogle_systemd_wanted_services_list: []
# Database-related configuration fields.
#
# To use SQLite, stick to these defaults.
#
# To use Postgres:
# - change the engine (`matrix_bot_postmoogle_database_engine: 'postgres'`)
# - adjust your database credentials via the `matrix_bot_postmoogle_database_*` variables
matrix_bot_postmoogle_database_engine: 'sqlite'
matrix_bot_postmoogle_sqlite_database_path_local: "{{ matrix_bot_postmoogle_data_path }}/bot.db"
matrix_bot_postmoogle_sqlite_database_path_in_container: "/data/bot.db"
matrix_bot_postmoogle_database_username: 'postmoogle'
matrix_bot_postmoogle_database_password: 'some-password'
matrix_bot_postmoogle_database_hostname: ''
matrix_bot_postmoogle_database_port: 5432
matrix_bot_postmoogle_database_name: 'postmoogle'
matrix_bot_postmoogle_database_sslmode: disable
matrix_bot_postmoogle_database_connection_string: 'postgres://{{ matrix_bot_postmoogle_database_username }}:{{ matrix_bot_postmoogle_database_password }}@{{ matrix_bot_postmoogle_database_hostname }}:{{ matrix_bot_postmoogle_database_port }}/{{ matrix_bot_postmoogle_database_name }}?sslmode={{ matrix_bot_postmoogle_database_sslmode }}'
matrix_bot_postmoogle_storage_database: "{{
{
'sqlite': matrix_bot_postmoogle_sqlite_database_path_in_container,
'postgres': matrix_bot_postmoogle_database_connection_string,
}[matrix_bot_postmoogle_database_engine]
}}"
matrix_bot_postmoogle_database_dialect: "{{
{
'sqlite': 'sqlite3',
'postgres': 'postgres',
}[matrix_bot_postmoogle_database_engine]
}}"
# The bot's username. This user needs to be created manually beforehand.
# Also see `matrix_bot_postmoogle_password` or `matrix_bot_postmoogle_sharedsecret`
matrix_bot_postmoogle_login: "postmoogle"
# The password that the bot uses to authenticate.
matrix_bot_postmoogle_password: ''
# Alternative to password - shared secret requires matrix_bot_postmoogle_login to be MXID
matrix_bot_postmoogle_sharedsecret: ''
matrix_bot_postmoogle_homeserver: ""
# Command prefix
matrix_bot_postmoogle_prefix: '!pm'
# Max email size in megabytes, including attachments
matrix_bot_postmoogle_maxsize: '1024'
# Optional SMTP relay mode
matrix_bot_postmoogle_relay_host: ''
matrix_bot_postmoogle_relay_port: ''
matrix_bot_postmoogle_relay_username: ''
matrix_bot_postmoogle_relay_password: ''
# A list of admins
# Example set of rules:
# matrix_bot_postmoogle_admins:
# - '@someone:example.com'
# - '@another:example.com'
# - '@bot.*:example.com'
# - '@*:example.net'
matrix_bot_postmoogle_admins: "{{ [matrix_admin] if matrix_admin else [] }}"
# Sentry DSN. Deprecated, use matrix_bot_postmoogle_monitoring_sentry_dsn
matrix_bot_postmoogle_sentry: ''
# Sentry integration
matrix_bot_postmoogle_monitoring_sentry_dsn: "{{ matrix_bot_postmoogle_sentry }}"
matrix_bot_postmoogle_monitoring_sentry_rate: 20
# healthchecks.io integration
matrix_bot_postmoogle_monitoring_healthchecks_uuid: ''
matrix_bot_postmoogle_monitoring_healthchecks_duration: 60
# Log level
matrix_bot_postmoogle_loglevel: 'INFO'
# deprecated, use matrix_bot_postmoogle_domains
matrix_bot_postmoogle_domain: "{{ matrix_server_fqn_matrix }}"
matrix_bot_postmoogle_domains:
- "{{ matrix_bot_postmoogle_domain }}" # backward compatibility
# Password (passphrase) to encrypt account data
matrix_bot_postmoogle_data_secret: ""
# in-container ports
matrix_bot_postmoogle_port: '2525'
matrix_bot_postmoogle_tls_port: '25587'
# on-host ports
matrix_bot_postmoogle_smtp_host_bind_port: '25'
matrix_bot_postmoogle_submission_host_bind_port: '587'
### SSL
## on-host SSL dir
matrix_bot_postmoogle_ssl_path: ""
## in-container SSL paths
# matrix_bot_postmoogle_tls_cert is the SSL certificates' certificates.
# This var is likely set via group_vars/matrix_servers, so you don't need to set certs manually.
# If you do need to set it manually, note that this is an in-container path.
# To mount a certificates volumes into the container, use matrix_bot_postmoogle_ssl_path
# Example value: /ssl/live/{{ matrix_bot_postmoogle_domain }}/fullchain.pem
matrix_bot_postmoogle_tls_cert: ""
# matrix_bot_postmoogle_tls_key is the SSL certificates' keys.
# This var is likely set via group_vars/matrix_servers, so you don't need to set keys manually.
# If you do need to set it manually, note that this is an in-container path.
# To mount a certificates volumes into the container, use matrix_bot_postmoogle_ssl_path
# Example value: /ssl/live/{{ matrix_bot_postmoogle_domain }}/privkey.pem
matrix_bot_postmoogle_tls_key: ""
# Mandatory TLS, even on plain SMTP port
matrix_bot_postmoogle_tls_required: false
# trusted proxies
matrix_bot_postmoogle_proxies: []
# known forwarders
matrix_bot_postmoogle_mailboxes_forwarded: []
# reserved mailboxes
matrix_bot_postmoogle_mailboxes_reserved: []
# mailbox activation flow
matrix_bot_postmoogle_mailboxes_activation: none
# Additional environment variables to pass to the postmoogle container
#
# Example:
# matrix_bot_postmoogle_environment_variables_extension: |
# postmoogle_TEXT_DONE=Done
matrix_bot_postmoogle_environment_variables_extension: ''

View File

@ -1,94 +0,0 @@
---
- when: "matrix_bot_postmoogle_database_engine == 'postgres'"
block:
- name: Check if an SQLite database already exists
ansible.builtin.stat:
path: "{{ matrix_bot_postmoogle_sqlite_database_path_local }}"
register: matrix_bot_postmoogle_sqlite_database_path_local_stat_result
- when: "matrix_bot_postmoogle_sqlite_database_path_local_stat_result.stat.exists | bool"
block:
- ansible.builtin.include_role:
name: galaxy/postgres
tasks_from: migrate_db_to_postgres
vars:
postgres_db_migration_request:
src: "{{ matrix_bot_postmoogle_sqlite_database_path_local }}"
dst: "{{ matrix_bot_postmoogle_database_connection_string }}"
caller: "{{ role_path | basename }}"
engine_variable_name: 'matrix_bot_postmoogle_database_engine'
engine_old: 'sqlite'
systemd_services_to_stop: ['matrix-bot-postmoogle.service']
- ansible.builtin.set_fact:
matrix_bot_postmoogle_requires_restart: true
- name: Ensure postmoogle paths exist
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
mode: 0750
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
with_items:
- {path: "{{ matrix_bot_postmoogle_config_path }}", when: true}
- {path: "{{ matrix_bot_postmoogle_data_path }}", when: true}
- {path: "{{ matrix_bot_postmoogle_docker_src_files_path }}", when: matrix_bot_postmoogle_container_image_self_build}
when: "item.when | bool"
- name: Ensure postmoogle environment variables file created
ansible.builtin.template:
src: "{{ role_path }}/templates/env.j2"
dest: "{{ matrix_bot_postmoogle_config_path }}/env"
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
mode: 0640
- name: Ensure postmoogle image is pulled
community.docker.docker_image:
name: "{{ matrix_bot_postmoogle_docker_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_bot_postmoogle_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_postmoogle_docker_image_force_pull }}"
when: "not matrix_bot_postmoogle_container_image_self_build | bool"
register: result
retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed
- name: Ensure postmoogle repository is present on self-build
ansible.builtin.git:
repo: "{{ matrix_bot_postmoogle_docker_repo }}"
version: "{{ matrix_bot_postmoogle_docker_repo_version }}"
dest: "{{ matrix_bot_postmoogle_docker_src_files_path }}"
force: "yes"
become: true
become_user: "{{ matrix_user_username }}"
register: matrix_bot_postmoogle_git_pull_results
when: "matrix_bot_postmoogle_container_image_self_build | bool"
- name: Ensure postmoogle image is built
community.docker.docker_image:
name: "{{ matrix_bot_postmoogle_docker_image }}"
source: build
force_source: "{{ matrix_bot_postmoogle_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_postmoogle_git_pull_results.changed }}"
build:
dockerfile: Dockerfile
path: "{{ matrix_bot_postmoogle_docker_src_files_path }}"
pull: true
when: "matrix_bot_postmoogle_container_image_self_build | bool"
- name: Ensure postmoogle container network is created
community.general.docker_network:
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
name: "{{ matrix_bot_postmoogle_container_network }}"
driver: bridge
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
- name: Ensure matrix-bot-postmoogle.service installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-postmoogle.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
mode: 0644
register: matrix_bot_postmoogle_systemd_service_result

View File

@ -1,12 +0,0 @@
---
- name: Fail if required Postmoogle settings not defined
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and vars[item.name] == ''"
with_items:
- {'name': 'matrix_bot_postmoogle_password', when: true}
- {'name': 'matrix_bot_postmoogle_container_network', when: true}
- {'name': 'matrix_bot_postmoogle_homeserver', when: true}
- {'name': 'matrix_bot_postmoogle_database_hostname', when: "{{ matrix_bot_postmoogle_database_engine == 'postgres' }}"}

View File

@ -1,31 +0,0 @@
POSTMOOGLE_LOGIN={{ matrix_bot_postmoogle_login }}
POSTMOOGLE_PASSWORD={{ matrix_bot_postmoogle_password }}
POSTMOOGLE_SHAREDSECRET={{ matrix_bot_postmoogle_sharedsecret }}
POSTMOOGLE_HOMESERVER={{ matrix_bot_postmoogle_homeserver }}
POSTMOOGLE_DOMAINS={{ matrix_bot_postmoogle_domains | join(' ') }}
POSTMOOGLE_PORT={{ matrix_bot_postmoogle_port }}
POSTMOOGLE_DB_DSN={{ matrix_bot_postmoogle_database_connection_string }}
POSTMOOGLE_DB_DIALECT={{ matrix_bot_postmoogle_database_dialect }}
POSTMOOGLE_PREFIX={{ matrix_bot_postmoogle_prefix }}
POSTMOOGLE_MAXSIZE={{ matrix_bot_postmoogle_maxsize }}
POSTMOOGLE_LOGLEVEL={{ matrix_bot_postmoogle_loglevel }}
POSTMOOGLE_ADMINS={{ matrix_bot_postmoogle_admins | join(' ') }}
POSTMOOGLE_TLS_PORT={{ matrix_bot_postmoogle_tls_port }}
POSTMOOGLE_TLS_CERT={{ matrix_bot_postmoogle_tls_cert }}
POSTMOOGLE_TLS_KEY={{ matrix_bot_postmoogle_tls_key }}
POSTMOOGLE_TLS_REQUIRED={{ matrix_bot_postmoogle_tls_required }}
POSTMOOGLE_DATA_SECRET={{ matrix_bot_postmoogle_data_secret }}
POSTMOOGLE_PROXIES={{ matrix_bot_postmoogle_proxies | join(' ') }}
POSTMOOGLE_RELAY_HOST={{ matrix_bot_postmoogle_relay_host }}
POSTMOOGLE_RELAY_PORT={{ matrix_bot_postmoogle_relay_port }}
POSTMOOGLE_RELAY_USERNAME={{ matrix_bot_postmoogle_relay_username }}
POSTMOOGLE_RELAY_PASSWORD={{ matrix_bot_postmoogle_relay_password }}
POSTMOOGLE_MONITORING_SENTRY_DSN={{ matrix_bot_postmoogle_monitoring_sentry_dsn }}
POSTMOOGLE_MONITORING_SENTRY_RATE={{ matrix_bot_postmoogle_monitoring_sentry_rate }}
POSTMOOGLE_MONITORING_HEALTHCHECKS_UUID={{ matrix_bot_postmoogle_monitoring_healthchecks_uuid }}
POSTMOOGLE_MONITORING_HEALTHCHECKS_DURATION={{ matrix_bot_postmoogle_monitoring_healthchecks_duration }}
POSTMOOGLE_MAILBOXES_FORWARDED={{ matrix_bot_postmoogle_mailboxes_forwarded | join(' ') }}
POSTMOOGLE_MAILBOXES_RESERVED={{ matrix_bot_postmoogle_mailboxes_reserved | join(' ') }}
POSTMOOGLE_MAILBOXES_ACTIVATION={{ matrix_bot_postmoogle_mailboxes_activation }}
{{ matrix_bot_postmoogle_environment_variables_extension }}

View File

@ -0,0 +1,179 @@
---
# postmoogle is an email to Matrix bridge using its bot user
# Project source code URL: https://github.com/etkecc/postmoogle
matrix_postmoogle_enabled: true
matrix_postmoogle_container_image_self_build: false
matrix_postmoogle_docker_repo: "https://github.com/etkecc/postmoogle.git"
matrix_postmoogle_docker_repo_version: "{{ 'main' if matrix_postmoogle_version == 'latest' else matrix_postmoogle_version }}"
matrix_postmoogle_docker_src_files_path: "{{ matrix_base_data_path }}/postmoogle/docker-src"
# renovate: datasource=docker depName=ghcr.io/etkecc/postmoogle
matrix_postmoogle_version: v0.9.23
matrix_postmoogle_docker_image: "{{ matrix_postmoogle_docker_image_name_prefix }}etkecc/postmoogle:{{ matrix_postmoogle_version }}"
matrix_postmoogle_docker_image_name_prefix: "{{ 'localhost/' if matrix_postmoogle_container_image_self_build else 'ghcr.io/' }}"
matrix_postmoogle_docker_image_force_pull: "{{ matrix_postmoogle_docker_image.endswith(':latest') }}"
matrix_postmoogle_base_path: "{{ matrix_base_data_path }}/postmoogle"
matrix_postmoogle_config_path: "{{ matrix_postmoogle_base_path }}/config"
matrix_postmoogle_data_path: "{{ matrix_postmoogle_base_path }}/data"
matrix_postmoogle_container_network: ""
matrix_postmoogle_container_additional_networks: "{{ matrix_postmoogle_container_additional_networks_auto + matrix_postmoogle_container_additional_networks_custom }}"
matrix_postmoogle_container_additional_networks_auto: []
matrix_postmoogle_container_additional_networks_custom: []
# A list of extra arguments to pass to the container
matrix_postmoogle_container_extra_arguments: []
# List of systemd services that matrix-postmoogle.service depends on
matrix_postmoogle_systemd_required_services_list: "{{ matrix_postmoogle_systemd_required_services_list_default + matrix_postmoogle_systemd_required_services_list_auto + matrix_postmoogle_systemd_required_services_list_custom }}"
matrix_postmoogle_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
matrix_postmoogle_systemd_required_services_list_auto: []
matrix_postmoogle_systemd_required_services_list_custom: []
# List of systemd services that matrix-postmoogle.service wants
matrix_postmoogle_systemd_wanted_services_list: []
# Database-related configuration fields.
#
# To use SQLite, stick to these defaults.
#
# To use Postgres:
# - change the engine (`matrix_postmoogle_database_engine: 'postgres'`)
# - adjust your database credentials via the `matrix_postmoogle_database_*` variables
matrix_postmoogle_database_engine: 'sqlite'
matrix_postmoogle_sqlite_database_path_local: "{{ matrix_postmoogle_data_path }}/bot.db"
matrix_postmoogle_sqlite_database_path_in_container: "/data/bot.db"
matrix_postmoogle_database_username: 'postmoogle'
matrix_postmoogle_database_password: 'some-password'
matrix_postmoogle_database_hostname: ''
matrix_postmoogle_database_port: 5432
matrix_postmoogle_database_name: 'postmoogle'
matrix_postmoogle_database_sslmode: disable
matrix_postmoogle_database_connection_string: 'postgres://{{ matrix_postmoogle_database_username }}:{{ matrix_postmoogle_database_password }}@{{ matrix_postmoogle_database_hostname }}:{{ matrix_postmoogle_database_port }}/{{ matrix_postmoogle_database_name }}?sslmode={{ matrix_postmoogle_database_sslmode }}'
matrix_postmoogle_storage_database: "{{
{
'sqlite': matrix_postmoogle_sqlite_database_path_in_container,
'postgres': matrix_postmoogle_database_connection_string,
}[matrix_postmoogle_database_engine]
}}"
matrix_postmoogle_database_dialect: "{{
{
'sqlite': 'sqlite3',
'postgres': 'postgres',
}[matrix_postmoogle_database_engine]
}}"
# The bot's username. This user needs to be created manually beforehand.
# Also see `matrix_postmoogle_password` or `matrix_postmoogle_sharedsecret`
matrix_postmoogle_login: "postmoogle"
# The password that the bot uses to authenticate.
matrix_postmoogle_password: ''
# Alternative to password - shared secret requires matrix_postmoogle_login to be MXID
matrix_postmoogle_sharedsecret: ''
matrix_postmoogle_homeserver: ""
# Command prefix
matrix_postmoogle_prefix: '!pm'
# Max email size in megabytes, including attachments
matrix_postmoogle_maxsize: '1024'
# Optional SMTP relay mode
matrix_postmoogle_relay_host: ''
matrix_postmoogle_relay_port: ''
matrix_postmoogle_relay_username: ''
matrix_postmoogle_relay_password: ''
# A list of admins
# Example set of rules:
# matrix_postmoogle_admins:
# - '@someone:example.com'
# - '@another:example.com'
# - '@bot.*:example.com'
# - '@*:example.net'
matrix_postmoogle_admins: "{{ [matrix_admin] if matrix_admin else [] }}"
# Sentry DSN. Deprecated, use matrix_postmoogle_monitoring_sentry_dsn
matrix_postmoogle_sentry: ''
# Sentry integration
matrix_postmoogle_monitoring_sentry_dsn: "{{ matrix_postmoogle_sentry }}"
matrix_postmoogle_monitoring_sentry_rate: 20
# healthchecks.io integration
matrix_postmoogle_monitoring_healthchecks_uuid: ''
matrix_postmoogle_monitoring_healthchecks_duration: 60
# Log level
matrix_postmoogle_loglevel: 'INFO'
# deprecated, use matrix_postmoogle_domains
matrix_postmoogle_domain: "{{ matrix_server_fqn_matrix }}"
matrix_postmoogle_domains:
- "{{ matrix_postmoogle_domain }}" # backward compatibility
# Password (passphrase) to encrypt account data
matrix_postmoogle_data_secret: ""
# in-container ports
matrix_postmoogle_port: '2525'
matrix_postmoogle_tls_port: '25587'
# on-host ports
matrix_postmoogle_smtp_host_bind_port: '25'
matrix_postmoogle_submission_host_bind_port: '587'
### SSL
## on-host SSL dir
matrix_postmoogle_ssl_path: ""
## in-container SSL paths
# matrix_postmoogle_tls_cert is the SSL certificates' certificates.
# This var is likely set via group_vars/matrix_servers, so you don't need to set certs manually.
# If you do need to set it manually, note that this is an in-container path.
# To mount a certificates volumes into the container, use matrix_postmoogle_ssl_path
# Example value: /ssl/live/{{ matrix_postmoogle_domain }}/fullchain.pem
matrix_postmoogle_tls_cert: ""
# matrix_postmoogle_tls_key is the SSL certificates' keys.
# This var is likely set via group_vars/matrix_servers, so you don't need to set keys manually.
# If you do need to set it manually, note that this is an in-container path.
# To mount a certificates volumes into the container, use matrix_postmoogle_ssl_path
# Example value: /ssl/live/{{ matrix_postmoogle_domain }}/privkey.pem
matrix_postmoogle_tls_key: ""
# Mandatory TLS, even on plain SMTP port
matrix_postmoogle_tls_required: false
# trusted proxies
matrix_postmoogle_proxies: []
# known forwarders
matrix_postmoogle_mailboxes_forwarded: []
# reserved mailboxes
matrix_postmoogle_mailboxes_reserved: []
# mailbox activation flow
matrix_postmoogle_mailboxes_activation: none
# Additional environment variables to pass to the postmoogle container
#
# Example:
# matrix_postmoogle_environment_variables_extension: |
# postmoogle_TEXT_DONE=Done
matrix_postmoogle_environment_variables_extension: ''

View File

@ -2,19 +2,19 @@
- tags:
- setup-all
- setup-bot-postmoogle
- setup-postmoogle
- install-all
- install-bot-postmoogle
- install-postmoogle
block:
- when: matrix_bot_postmoogle_enabled | bool
- when: matrix_postmoogle_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
- when: matrix_bot_postmoogle_enabled | bool
- when: matrix_postmoogle_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
- tags:
- setup-all
- setup-bot-postmoogle
- setup-postmoogle
block:
- when: not matrix_bot_postmoogle_enabled | bool
- when: not matrix_postmoogle_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"

View File

@ -0,0 +1,119 @@
---
# Check and remove the legacy systemd service (`matrix-bot-postmoogle.service`).
# This role uses `matrix-postmoogle.service` now.
# Related to: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3698
- name: Check if matrix-bot-postmoogle.service exists
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
register: matrix_bot_postmoogle_service_stat
- name: Stop and remove legacy matrix-bot-postmoogle systemd service
when: matrix_bot_postmoogle_service_stat.stat.exists | bool
block:
- name: Ensure legacy matrix-bot-postmoogle service is stopped
ansible.builtin.service:
name: matrix-bot-postmoogle
state: stopped
enabled: false
failed_when: false
- name: Remove legacy matrix-bot-postmoogle service file
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
state: absent
- when: "matrix_postmoogle_database_engine == 'postgres'"
block:
- name: Check if an SQLite database already exists
ansible.builtin.stat:
path: "{{ matrix_postmoogle_sqlite_database_path_local }}"
register: matrix_postmoogle_sqlite_database_path_local_stat_result
- when: "matrix_postmoogle_sqlite_database_path_local_stat_result.stat.exists | bool"
block:
- ansible.builtin.include_role:
name: galaxy/postgres
tasks_from: migrate_db_to_postgres
vars:
postgres_db_migration_request:
src: "{{ matrix_postmoogle_sqlite_database_path_local }}"
dst: "{{ matrix_postmoogle_database_connection_string }}"
caller: "{{ role_path | basename }}"
engine_variable_name: 'matrix_postmoogle_database_engine'
engine_old: 'sqlite'
systemd_services_to_stop: ['matrix-postmoogle.service']
- ansible.builtin.set_fact:
matrix_postmoogle_requires_restart: true
- name: Ensure postmoogle paths exist
ansible.builtin.file:
path: "{{ item.path }}"
state: directory
mode: 0750
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
with_items:
- {path: "{{ matrix_postmoogle_config_path }}", when: true}
- {path: "{{ matrix_postmoogle_data_path }}", when: true}
- {path: "{{ matrix_postmoogle_docker_src_files_path }}", when: matrix_postmoogle_container_image_self_build}
when: "item.when | bool"
- name: Ensure postmoogle environment variables file created
ansible.builtin.template:
src: "{{ role_path }}/templates/env.j2"
dest: "{{ matrix_postmoogle_config_path }}/env"
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
mode: 0640
- name: Ensure postmoogle image is pulled
community.docker.docker_image:
name: "{{ matrix_postmoogle_docker_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_postmoogle_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_postmoogle_docker_image_force_pull }}"
when: "not matrix_postmoogle_container_image_self_build | bool"
register: result
retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed
- name: Ensure postmoogle repository is present on self-build
ansible.builtin.git:
repo: "{{ matrix_postmoogle_docker_repo }}"
version: "{{ matrix_postmoogle_docker_repo_version }}"
dest: "{{ matrix_postmoogle_docker_src_files_path }}"
force: "yes"
become: true
become_user: "{{ matrix_user_username }}"
register: matrix_postmoogle_git_pull_results
when: "matrix_postmoogle_container_image_self_build | bool"
- name: Ensure postmoogle image is built
community.docker.docker_image:
name: "{{ matrix_postmoogle_docker_image }}"
source: build
force_source: "{{ matrix_postmoogle_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_postmoogle_git_pull_results.changed }}"
build:
dockerfile: Dockerfile
path: "{{ matrix_postmoogle_docker_src_files_path }}"
pull: true
when: "matrix_postmoogle_container_image_self_build | bool"
- name: Ensure postmoogle container network is created
community.general.docker_network:
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
name: "{{ matrix_postmoogle_container_network }}"
driver: bridge
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
- name: Ensure matrix-postmoogle.service installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-postmoogle.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postmoogle.service"
mode: 0644
register: matrix_postmoogle_systemd_service_result

View File

@ -2,24 +2,24 @@
- name: Check existence of matrix-postmoogle service
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
register: matrix_bot_postmoogle_service_stat
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postmoogle.service"
register: matrix_postmoogle_service_stat
- when: matrix_bot_postmoogle_service_stat.stat.exists | bool
- when: matrix_postmoogle_service_stat.stat.exists | bool
block:
- name: Ensure matrix-postmoogle is stopped
ansible.builtin.service:
name: matrix-bot-postmoogle
name: matrix-postmoogle
state: stopped
enabled: false
daemon_reload: true
- name: Ensure matrix-bot-postmoogle.service doesn't exist
- name: Ensure matrix-postmoogle.service doesn't exist
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postmoogle.service"
state: absent
- name: Ensure Matrix postmoogle paths don't exist
ansible.builtin.file:
path: "{{ matrix_bot_postmoogle_base_path }}"
path: "{{ matrix_postmoogle_base_path }}"
state: absent

View File

@ -0,0 +1,12 @@
---
- name: Fail if required Postmoogle settings not defined
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and vars[item.name] == ''"
with_items:
- {'name': 'matrix_postmoogle_password', when: true}
- {'name': 'matrix_postmoogle_container_network', when: true}
- {'name': 'matrix_postmoogle_homeserver', when: true}
- {'name': 'matrix_postmoogle_database_hostname', when: "{{ matrix_postmoogle_database_engine == 'postgres' }}"}

View File

@ -0,0 +1,31 @@
POSTMOOGLE_LOGIN={{ matrix_postmoogle_login }}
POSTMOOGLE_PASSWORD={{ matrix_postmoogle_password }}
POSTMOOGLE_SHAREDSECRET={{ matrix_postmoogle_sharedsecret }}
POSTMOOGLE_HOMESERVER={{ matrix_postmoogle_homeserver }}
POSTMOOGLE_DOMAINS={{ matrix_postmoogle_domains | join(' ') }}
POSTMOOGLE_PORT={{ matrix_postmoogle_port }}
POSTMOOGLE_DB_DSN={{ matrix_postmoogle_database_connection_string }}
POSTMOOGLE_DB_DIALECT={{ matrix_postmoogle_database_dialect }}
POSTMOOGLE_PREFIX={{ matrix_postmoogle_prefix }}
POSTMOOGLE_MAXSIZE={{ matrix_postmoogle_maxsize }}
POSTMOOGLE_LOGLEVEL={{ matrix_postmoogle_loglevel }}
POSTMOOGLE_ADMINS={{ matrix_postmoogle_admins | join(' ') }}
POSTMOOGLE_TLS_PORT={{ matrix_postmoogle_tls_port }}
POSTMOOGLE_TLS_CERT={{ matrix_postmoogle_tls_cert }}
POSTMOOGLE_TLS_KEY={{ matrix_postmoogle_tls_key }}
POSTMOOGLE_TLS_REQUIRED={{ matrix_postmoogle_tls_required }}
POSTMOOGLE_DATA_SECRET={{ matrix_postmoogle_data_secret }}
POSTMOOGLE_PROXIES={{ matrix_postmoogle_proxies | join(' ') }}
POSTMOOGLE_RELAY_HOST={{ matrix_postmoogle_relay_host }}
POSTMOOGLE_RELAY_PORT={{ matrix_postmoogle_relay_port }}
POSTMOOGLE_RELAY_USERNAME={{ matrix_postmoogle_relay_username }}
POSTMOOGLE_RELAY_PASSWORD={{ matrix_postmoogle_relay_password }}
POSTMOOGLE_MONITORING_SENTRY_DSN={{ matrix_postmoogle_monitoring_sentry_dsn }}
POSTMOOGLE_MONITORING_SENTRY_RATE={{ matrix_postmoogle_monitoring_sentry_rate }}
POSTMOOGLE_MONITORING_HEALTHCHECKS_UUID={{ matrix_postmoogle_monitoring_healthchecks_uuid }}
POSTMOOGLE_MONITORING_HEALTHCHECKS_DURATION={{ matrix_postmoogle_monitoring_healthchecks_duration }}
POSTMOOGLE_MAILBOXES_FORWARDED={{ matrix_postmoogle_mailboxes_forwarded | join(' ') }}
POSTMOOGLE_MAILBOXES_RESERVED={{ matrix_postmoogle_mailboxes_reserved | join(' ') }}
POSTMOOGLE_MAILBOXES_ACTIVATION={{ matrix_postmoogle_mailboxes_activation }}
{{ matrix_postmoogle_environment_variables_extension }}

View File

@ -1,11 +1,11 @@
#jinja2: lstrip_blocks: "True"
[Unit]
Description=Matrix Postmoogle bot
{% for service in matrix_bot_postmoogle_systemd_required_services_list %}
Description=Matrix Postmoogle bridge
{% for service in matrix_postmoogle_systemd_required_services_list %}
Requires={{ service }}
After={{ service }}
{% endfor %}
{% for service in matrix_bot_postmoogle_systemd_wanted_services_list %}
{% for service in matrix_postmoogle_systemd_wanted_services_list %}
Wants={{ service }}
{% endfor %}
DefaultDependencies=no
@ -13,42 +13,42 @@ DefaultDependencies=no
[Service]
Type=simple
Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-postmoogle 2>/dev/null || true'
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-postmoogle 2>/dev/null || true'
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--rm \
--name=matrix-bot-postmoogle \
--name=matrix-postmoogle \
--log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \
--read-only \
--network={{ matrix_bot_postmoogle_container_network }} \
--env-file={{ matrix_bot_postmoogle_config_path }}/env \
-p {{ matrix_bot_postmoogle_smtp_host_bind_port }}:{{ matrix_bot_postmoogle_port }} \
{% if matrix_bot_postmoogle_ssl_path %}
-p {{ matrix_bot_postmoogle_submission_host_bind_port }}:{{ matrix_bot_postmoogle_tls_port }} \
--network={{ matrix_postmoogle_container_network }} \
--env-file={{ matrix_postmoogle_config_path }}/env \
-p {{ matrix_postmoogle_smtp_host_bind_port }}:{{ matrix_postmoogle_port }} \
{% if matrix_postmoogle_ssl_path %}
-p {{ matrix_postmoogle_submission_host_bind_port }}:{{ matrix_postmoogle_tls_port }} \
{% endif %}
--mount type=bind,src={{ matrix_bot_postmoogle_data_path }},dst=/data \
{% if matrix_bot_postmoogle_ssl_path %}
--mount type=bind,src={{ matrix_bot_postmoogle_ssl_path }},dst=/ssl \
--mount type=bind,src={{ matrix_postmoogle_data_path }},dst=/data \
{% if matrix_postmoogle_ssl_path %}
--mount type=bind,src={{ matrix_postmoogle_ssl_path }},dst=/ssl \
{% endif %}
{% for arg in matrix_bot_postmoogle_container_extra_arguments %}
{% for arg in matrix_postmoogle_container_extra_arguments %}
{{ arg }} \
{% endfor %}
{{ matrix_bot_postmoogle_docker_image }}
{{ matrix_postmoogle_docker_image }}
{% for network in matrix_bot_postmoogle_container_additional_networks %}
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-postmoogle
{% for network in matrix_postmoogle_container_additional_networks %}
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-postmoogle
{% endfor %}
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-bot-postmoogle
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-postmoogle
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-postmoogle 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-postmoogle 2>/dev/null || true'
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-postmoogle 2>/dev/null || true'
Restart=always
RestartSec=30
SyslogIdentifier=matrix-bot-postmoogle
SyslogIdentifier=matrix-postmoogle
[Install]
WantedBy=multi-user.target

View File

@ -14,7 +14,7 @@ matrix_synapse_admin_container_image_self_build: false
matrix_synapse_admin_container_image_self_build_repo: "https://github.com/etkecc/synapse-admin.git"
# renovate: datasource=docker depName=ghcr.io/etkecc/synapse-admin
matrix_synapse_admin_version: v0.10.3-etke25
matrix_synapse_admin_version: v0.10.3-etke26
matrix_synapse_admin_docker_image: "{{ matrix_synapse_admin_docker_image_name_prefix }}etkecc/synapse-admin:{{ matrix_synapse_admin_version }}"
matrix_synapse_admin_docker_image_name_prefix: "{{ 'localhost/' if matrix_synapse_admin_container_image_self_build else 'ghcr.io/' }}"
matrix_synapse_admin_docker_image_force_pull: "{{ matrix_synapse_admin_docker_image.endswith(':latest') }}"

View File

@ -27,6 +27,9 @@ matrix_playbook_migration_matrix_aux_migration_validation_enabled: true
# Controls if (`matrix_jitsi` -> `jitsi`) validation will run.
matrix_playbook_migration_matrix_jitsi_migration_validation_enabled: true
# Controls if (`matrix_bot_postmoogle_` -> `matrix_postmoogle_`) validation will run.
matrix_playbook_migration_matrix_postmoogle_migration_validation_enabled: true
# Controls if the old apt repository (likely without a `signed-by` option) on Debian-based systems will be removed.
#
# Older versions of the Docker role (5.x, 6.x) used to install a repository at a path like: `/etc/apt/sources.list.d/download_docker_com_linux_*`

View File

@ -223,6 +223,20 @@
We found usage of the following variables: {{ matrix_playbook_migration_jitsi_migration_vars.keys() | join(', ') }}
when: "matrix_playbook_migration_jitsi_migration_vars | length > 0"
- when: matrix_playbook_migration_matrix_postmoogle_migration_validation_enabled | bool
block:
- ansible.builtin.set_fact:
matrix_playbook_migration_postmoogle_migration_vars: |-
{{ vars | dict2items | selectattr('key', 'match', 'matrix_bot_postmoogle_.*') | list | items2dict }}
- name: (Deprecation) Catch and report matrix_bot_postmoogle variables
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.
Please change your configuration (vars.yml) to rename all variables (`matrix_bot_postmoogle_` -> `matrix_postmoogle_`).
We found usage of the following variables: {{ matrix_playbook_migration_postmoogle_migration_vars.keys() | join(', ') }}
when: "matrix_playbook_migration_postmoogle_migration_vars | length > 0"
- when: matrix_playbook_migration_matrix_nginx_proxy_elimination_variable_transition_checks_enabled | bool
block:
- name: (Deprecation) Catch and report transitioned playbook settings during the matrix-nginx-proxy elimination

View File

@ -82,6 +82,7 @@
- custom/matrix-bridge-mx-puppet-slack
- custom/matrix-bridge-mx-puppet-twitter
- custom/matrix-bridge-mx-puppet-instagram
- custom/matrix-bridge-postmoogle
- custom/matrix-bridge-sms
- custom/matrix-bridge-heisenbridge
- custom/matrix-bridge-hookshot
@ -91,7 +92,6 @@
- custom/matrix-bot-buscarron
- custom/matrix-bot-baibot
- custom/matrix-bot-honoroit
- custom/matrix-bot-postmoogle
- custom/matrix-bot-go-neb
- custom/matrix-bot-mjolnir
- custom/matrix-bot-draupnir