mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-04-11 16:34:42 +03:00
Compare commits
206 Commits
d620fa3b69
...
migration-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08e2b5d618 | ||
|
|
9f52db133b | ||
|
|
4991ce3c90 | ||
|
|
36d0c5d8c3 | ||
|
|
4174eafd6b | ||
|
|
09221fd611 | ||
|
|
b3153fcc49 | ||
|
|
312cfe9b41 | ||
|
|
b3a0f52824 | ||
|
|
27a2b126bc | ||
|
|
8ae8b83139 | ||
|
|
74cc760d00 | ||
|
|
c831ce6f63 | ||
|
|
d3241588e3 | ||
|
|
b092e126a9 | ||
|
|
5167507989 | ||
|
|
d7ec806b51 | ||
|
|
11fee5e4db | ||
|
|
5523277bc1 | ||
|
|
ed7be50cea | ||
|
|
4ac5266efc | ||
|
|
392ac0125f | ||
|
|
756e189141 | ||
|
|
c55156b394 | ||
|
|
446597aac9 | ||
|
|
b942715469 | ||
|
|
aeb71d3543 | ||
|
|
54c0b56200 | ||
|
|
12af6da9d0 | ||
|
|
f0a5393d48 | ||
|
|
68aca96cbd | ||
|
|
68318ce932 | ||
|
|
4e4bccd03a | ||
|
|
19423864f0 | ||
|
|
a000abdf19 | ||
|
|
b596319a4a | ||
|
|
f0906e79a9 | ||
|
|
2fff4b5b88 | ||
|
|
e09ea540a0 | ||
|
|
bd614abd30 | ||
|
|
b6f8a59b50 | ||
|
|
b7d501802c | ||
|
|
1c98e76423 | ||
|
|
cb7b13daad | ||
|
|
7e8f3250f7 | ||
|
|
e145bffb7e | ||
|
|
c3156a1a99 | ||
|
|
f9811a0e0a | ||
|
|
1dac2b5c14 | ||
|
|
c6d33b819a | ||
|
|
7e0d86d2ea | ||
|
|
a035d77b1a | ||
|
|
9934bc3e39 | ||
|
|
a2fd140a61 | ||
|
|
5df7e678f7 | ||
|
|
9af79ce4d2 | ||
|
|
0f687a69c5 | ||
|
|
ec36904671 | ||
|
|
69df322f40 | ||
|
|
c0044a9b0a | ||
|
|
63a0e8216b | ||
|
|
975f14d2d8 | ||
|
|
d80ef72fbe | ||
|
|
dfe8628fbf | ||
|
|
a3ff72ebff | ||
|
|
df76b1cd5b | ||
|
|
dafac35a0e | ||
|
|
980d1ccc5b | ||
|
|
f9fa63fc7e | ||
|
|
021285d8d2 | ||
|
|
e2d2a341a8 | ||
|
|
79a4156a78 | ||
|
|
d12970c0fd | ||
|
|
d4e8da3e0a | ||
|
|
2237b53979 | ||
|
|
0320e671e3 | ||
|
|
0c4bce582f | ||
|
|
4e3658bb98 | ||
|
|
94beb79279 | ||
|
|
ac559889f9 | ||
|
|
12d8015bc4 | ||
|
|
a602035383 | ||
|
|
1898bb5c49 | ||
|
|
805f3ef892 | ||
|
|
81b944540b | ||
|
|
df5b84588b | ||
|
|
6b6b74afa9 | ||
|
|
677919fc39 | ||
|
|
f803ad6957 | ||
|
|
5d7569adf0 | ||
|
|
82caf3a7d3 | ||
|
|
45d5ebd008 | ||
|
|
c3437e22e6 | ||
|
|
d046855f3a | ||
|
|
55ffeb226c | ||
|
|
0c40a03efc | ||
|
|
86bb61aba0 | ||
|
|
87ef61ac56 | ||
|
|
6d9b1a8260 | ||
|
|
df205a2f77 | ||
|
|
7e3b82b80e | ||
|
|
c3a9772f51 | ||
|
|
1f3ea18213 | ||
|
|
0acb1f98e8 | ||
|
|
58141f9926 | ||
|
|
1ee5c1f416 | ||
|
|
c9bb48ff11 | ||
|
|
0cbffe695b | ||
|
|
af237ac9c7 | ||
|
|
87a799faa6 | ||
|
|
f5b722b13d | ||
|
|
c0be489796 | ||
|
|
2d1be91ac2 | ||
|
|
bd809f16f3 | ||
|
|
58bf4fe34b | ||
|
|
a787993aaf | ||
|
|
d5ffc94916 | ||
|
|
4208b4f553 | ||
|
|
768fdbbde3 | ||
|
|
af30790d6a | ||
|
|
baa1a29f76 | ||
|
|
9d6980a175 | ||
|
|
90bcb1f4ee | ||
|
|
46321552b7 | ||
|
|
0620d6a822 | ||
|
|
0a653dfeaa | ||
|
|
3564155a73 | ||
|
|
58937731f8 | ||
|
|
9bdf84eecf | ||
|
|
c4a05ce06a | ||
|
|
15ffb04293 | ||
|
|
a949605518 | ||
|
|
a77250ab97 | ||
|
|
a809f4d124 | ||
|
|
ceebf644a3 | ||
|
|
123dbbf191 | ||
|
|
37d45d6772 | ||
|
|
28afbde971 | ||
|
|
63b6bf4bc1 | ||
|
|
39f867a1c9 | ||
|
|
78a08482fa | ||
|
|
da86297655 | ||
|
|
8417f655af | ||
|
|
a7f7a3d002 | ||
|
|
e7419fbafa | ||
|
|
8c6c544c90 | ||
|
|
b98a6d39c9 | ||
|
|
93c6587b9d | ||
|
|
f187cf84d5 | ||
|
|
ee243a8aab | ||
|
|
816b95f951 | ||
|
|
324ff0dff6 | ||
|
|
2e7e034d3a | ||
|
|
2c29027868 | ||
|
|
1718181ff4 | ||
|
|
f1d1c50106 | ||
|
|
b55444e44f | ||
|
|
f96dcff028 | ||
|
|
c6cd76e988 | ||
|
|
4761ff7e9a | ||
|
|
976d2c4cd0 | ||
|
|
32aeaca28b | ||
|
|
ee79348254 | ||
|
|
a1dc468004 | ||
|
|
0da4c43cf1 | ||
|
|
1dfd4dc4ad | ||
|
|
b528f0e6af | ||
|
|
f2e961293c | ||
|
|
7bfa823fa3 | ||
|
|
5abd9cfb11 | ||
|
|
6e4a0ab2a1 | ||
|
|
1fc1da393d | ||
|
|
5ee0b4f168 | ||
|
|
3651a07f88 | ||
|
|
0cf3482eb2 | ||
|
|
6bfcec2d23 | ||
|
|
ff2a0be559 | ||
|
|
23203ff9d3 | ||
|
|
ca2b6b0a27 | ||
|
|
f0e0f5ec56 | ||
|
|
78d9f725b3 | ||
|
|
acf3d72c47 | ||
|
|
9d4ec45e72 | ||
|
|
bca2c43368 | ||
|
|
528a32f6c1 | ||
|
|
893e90a65f | ||
|
|
426839c287 | ||
|
|
51a357133b | ||
|
|
dbc71fccf7 | ||
|
|
f2ebc00e22 | ||
|
|
669490f18e | ||
|
|
dbe4b1db5f | ||
|
|
e5b48f22db | ||
|
|
bf744319e0 | ||
|
|
628bddb613 | ||
|
|
30be1a8892 | ||
|
|
2608ee8a3e | ||
|
|
23317b9caa | ||
|
|
e72b0bc483 | ||
|
|
1f3704d89d | ||
|
|
1d0bbce4cf | ||
|
|
7a2f036452 | ||
|
|
8a3017c964 | ||
|
|
f0f496b6ba | ||
|
|
7801b91aad | ||
|
|
fb01b79243 |
@@ -1,2 +1,2 @@
|
|||||||
[codespell]
|
[codespell]
|
||||||
ignore-words-list = aNULL,brose,doub,Udo,re-use,re-used,registr,shema
|
ignore-words-list = aNULL,brose,doub,Udo,re-use,re-used,registr,shema,commet,Commet
|
||||||
|
|||||||
51
.github/workflows/matrix.yml
vendored
51
.github/workflows/matrix.yml
vendored
@@ -9,34 +9,37 @@ name: Matrix CI
|
|||||||
|
|
||||||
on: [push, pull_request] # yamllint disable-line rule:truthy
|
on: [push, pull_request] # yamllint disable-line rule:truthy
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
yamllint:
|
prek:
|
||||||
name: yamllint
|
name: Run prek hooks
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
- name: Run yamllint
|
|
||||||
uses: frenck/action-yamllint@v1.5.0
|
|
||||||
ansible-lint:
|
|
||||||
name: ansible-lint
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: docker.io/archlinux:base-devel
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# git must be installed before checkout so it does a proper clone
|
||||||
|
# (with .git directory) instead of a tarball download.
|
||||||
|
- name: Install git
|
||||||
|
run: pacman -Sy --noconfirm git
|
||||||
|
|
||||||
- name: Check out
|
- name: Check out
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Run ansible-lint
|
- name: Restore prek cache
|
||||||
uses: ansible/ansible-lint@v26.1.1
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
args: "roles/custom"
|
path: var/prek
|
||||||
setup_python: "true"
|
key: arch-prek-v1-${{ hashFiles('.pre-commit-config.yaml') }}
|
||||||
working_directory: ""
|
|
||||||
requirements_file: requirements.yml
|
- name: Install dependencies
|
||||||
precommit:
|
run: pacman -S --noconfirm --needed just mise python
|
||||||
name: Run pre-commit
|
|
||||||
runs-on: ubuntu-latest
|
- name: Run prek hooks
|
||||||
steps:
|
run: |
|
||||||
- name: Checkout code
|
# The checkout action sets safe.directory using its own bundled
|
||||||
uses: actions/checkout@v6
|
# git, which is separate from the pacman-installed git that prek uses.
|
||||||
- name: Run pre-commit
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
uses: pre-commit/action@v3.0.1
|
just prek-run-on-all
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@
|
|||||||
.python-version
|
.python-version
|
||||||
.idea/
|
.idea/
|
||||||
.direnv/
|
.direnv/
|
||||||
|
/var/
|
||||||
|
|
||||||
# ignore roles pulled by ansible-galaxy
|
# ignore roles pulled by ansible-galaxy
|
||||||
/roles/galaxy/*
|
/roles/galaxy/*
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
---
|
---
|
||||||
default_install_hook_types: [pre-push]
|
|
||||||
|
|
||||||
exclude: "LICENSES/"
|
exclude: "^(LICENSES/|var/)"
|
||||||
|
|
||||||
# See: https://pre-commit.com/hooks.html
|
# See: https://pre-commit.com/hooks.html
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v6.0.0
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
# - id: check-executables-have-shebangs
|
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
- id: check-json
|
- id: check-json
|
||||||
|
- id: check-shebang-scripts-are-executable
|
||||||
- id: check-toml
|
- id: check-toml
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: v2.4.1
|
rev: v2.4.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
args: ["--skip=*.po,*.pot,i18n/"]
|
args: ["--skip=*.po,*.pot,i18n/"]
|
||||||
@@ -24,3 +23,18 @@ repos:
|
|||||||
rev: v6.2.0
|
rev: v6.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: reuse
|
- id: reuse
|
||||||
|
- repo: https://github.com/ansible/ansible-lint
|
||||||
|
rev: v26.3.0
|
||||||
|
hooks:
|
||||||
|
- id: ansible-lint
|
||||||
|
files: '^roles/custom/'
|
||||||
|
args: ['roles/custom']
|
||||||
|
pass_filenames: false
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: check-examples-vars-migration-version
|
||||||
|
name: Check examples/vars.yml migration version matches expected
|
||||||
|
entry: bin/check-examples-vars-migration-version.sh
|
||||||
|
language: script
|
||||||
|
files: '(examples/vars\.yml|roles/custom/matrix_playbook_migration/defaults/main\.yml)'
|
||||||
|
pass_filenames: false
|
||||||
|
|||||||
157
CHANGELOG.md
157
CHANGELOG.md
@@ -1,3 +1,156 @@
|
|||||||
|
# 2026-03-23
|
||||||
|
|
||||||
|
## Migration validation system introduced
|
||||||
|
|
||||||
|
Previously, when updating your setup, you had to remember to read the [CHANGELOG](CHANGELOG.md) file or risk breakage.
|
||||||
|
|
||||||
|
Now, the playbook includes a migration validation system that ensures you're aware of breaking changes before they affect your deployment.
|
||||||
|
You're now forced to acknowledge each breaking change, unless you wish to live dangerously (see below).
|
||||||
|
|
||||||
|
A new `matrix_playbook_migration_validated_version` variable has been introduced.
|
||||||
|
|
||||||
|
**New users** who started from the [example `vars.yml`](examples/vars.yml) file already have this variable set and do not need to do anything.
|
||||||
|
|
||||||
|
**Existing users** will need to add the following to their `vars.yml` file after reviewing all changelog entries up to now:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
matrix_playbook_migration_validated_version: v2026.03.23.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Going forward, whenever a breaking change is introduced the playbook will:
|
||||||
|
|
||||||
|
- bump its expected version value (`matrix_playbook_migration_expected_version`), causing a discrepancy with what you validated (`matrix_playbook_migration_validated_version`)
|
||||||
|
|
||||||
|
- fail when you run it with a helpful message listing what changed and linking to the relevant changelog entries
|
||||||
|
|
||||||
|
After reviewing and adapting your setup, you simply update the variable to the new version.
|
||||||
|
|
||||||
|
If you'd like to live dangerously and skip these checks (not recommended), you can set this once and be done with it:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
matrix_playbook_migration_validated_version: "{{ matrix_playbook_migration_expected_version }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
# 2026-03-19
|
||||||
|
|
||||||
|
## Matrix Authentication Service now prefers UNIX sockets for playbook-managed Postgres
|
||||||
|
|
||||||
|
When [Matrix Authentication Service](docs/configuring-playbook-matrix-authentication-service.md) (MAS) uses the playbook-managed Postgres service, it now connects to it via a [UNIX socket](https://en.wikipedia.org/wiki/Unix_domain_socket) by default instead of TCP.
|
||||||
|
|
||||||
|
This follows the same approach [applied to Synapse](#synapse-now-prefers-unix-sockets-for-playbook-managed-postgres-and-valkey) and reduces unnecessary container-network wiring, keeping local IPC off the network stack.
|
||||||
|
|
||||||
|
If you use an external Postgres server for MAS, this does not change your setup.
|
||||||
|
|
||||||
|
If you'd like to keep the previous TCP-based behavior, add the following configuration to your `vars.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
matrix_authentication_service_config_database_socket_enabled: false
|
||||||
|
```
|
||||||
|
|
||||||
|
# 2026-03-17
|
||||||
|
|
||||||
|
## Synapse now prefers UNIX sockets for playbook-managed Postgres and Valkey
|
||||||
|
|
||||||
|
When Synapse uses the playbook-managed Postgres and Valkey services, it now connects to them via [UNIX sockets](https://en.wikipedia.org/wiki/Unix_domain_socket) by default instead of TCP.
|
||||||
|
|
||||||
|
This reduces unnecessary container-network wiring and keeps local IPC off the network stack, which is a bit simpler and slightly more secure.
|
||||||
|
|
||||||
|
If you use an external Postgres server or external Redis/Valkey for Synapse, this does not change your setup.
|
||||||
|
|
||||||
|
If you'd like to keep the previous TCP-based behavior, add the following configuration to your `vars.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
matrix_synapse_database_socket_enabled: false
|
||||||
|
matrix_synapse_redis_path_enabled: false
|
||||||
|
```
|
||||||
|
|
||||||
|
# 2026-03-01
|
||||||
|
|
||||||
|
## (Potential BC Break) Synapse S3 media prefix is now applied consistently
|
||||||
|
|
||||||
|
The `matrix_synapse_ext_synapse_s3_storage_provider_config_prefix` variable is now wired consistently for both:
|
||||||
|
|
||||||
|
- the Synapse `s3_storage_provider` module configuration
|
||||||
|
- the `matrix-synapse-s3-storage-provider-migrate` migration script (`s3_media_upload --prefix`)
|
||||||
|
|
||||||
|
Previously, this variable could be set, but was not effectively applied by either of these paths.
|
||||||
|
|
||||||
|
**Affects**: users of [synapse-s3-storage-provider](docs/configuring-playbook-synapse-s3-storage-provider.md) who have configured a non-empty `matrix_synapse_ext_synapse_s3_storage_provider_config_prefix` value.
|
||||||
|
|
||||||
|
If your bucket data was uploaded without the prefix before this fix, enabling proper prefix usage can make existing objects appear missing until data is migrated/copied to the prefixed key namespace.
|
||||||
|
|
||||||
|
# 2026-02-26
|
||||||
|
|
||||||
|
## Internal refactor: merged the Synapse reverse-proxy companion role into `matrix-synapse`
|
||||||
|
|
||||||
|
The standalone `matrix-synapse-reverse-proxy-companion` role has been merged into the [matrix-synapse](roles/custom/matrix-synapse/) role.
|
||||||
|
|
||||||
|
This is not a user-facing change and does not change variable names (`matrix_synapse_reverse_proxy_companion_*` remain the same). The split looked clean on paper, but in practice both parts are tightly coupled through worker routing, tags (`setup-synapse`/`install-synapse`), and lifecycle ordering, so keeping them separate added coordination overhead with little practical benefit.
|
||||||
|
|
||||||
|
Compatibility note: existing companion-specific tags (`setup-synapse-reverse-proxy-companion` and `install-synapse-reverse-proxy-companion`) are still available.
|
||||||
|
|
||||||
|
With this change, Synapse and its reverse-proxy companion are managed in one role (`matrix-synapse`) while still keeping companion logic in dedicated task/template subdirectories for maintainability.
|
||||||
|
|
||||||
|
# 2026-02-21
|
||||||
|
|
||||||
|
## (BC Break) coturn is no longer auto-enabled by default
|
||||||
|
|
||||||
|
By default, the [coturn](./docs/configuring-playbook-turn.md) TURN server component is no longer enabled for every deployment.
|
||||||
|
|
||||||
|
This reduces resources and attach surface for deployments which:
|
||||||
|
|
||||||
|
- either don't need calls at all
|
||||||
|
- or use the modern [Matrix RTC](docs/configuring-playbook-matrix-rtc.md)/[Element Call](docs/configuring-playbook-element-call.md) stack.
|
||||||
|
|
||||||
|
Coturn is still auto-enabled when [Jitsi](./docs/configuring-playbook-jitsi.md) is enabled (`jitsi_enabled: true`), because Jitsi still depends on TURN for legacy Matrix integration.
|
||||||
|
|
||||||
|
Additionally, Coturn (when enabled) now defaults to using automatic IP detection of your server's external IP address, instead of assuming your Ansible inventory (`ansible_host`) points to a public address and using it for configuring `coturn_turn_external_ip_address`.
|
||||||
|
|
||||||
|
To restore the old behavior (needed for legacy call setups), add the following configuration to your `vars.yml`:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
coturn_enabled: true
|
||||||
|
|
||||||
|
# If you'd like explicit control over the external IP address (like before), keep this too.
|
||||||
|
coturn_turn_external_ip_address: "{{ ansible_host }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
## LiveKit TURN TLS is now automatically fronted by playbook-managed Traefik
|
||||||
|
|
||||||
|
For deployments that use the playbook-managed Traefik reverse-proxy, LiveKit TURN over TCP is now SSL-terminated at Traefik and passed as plain TCP to LiveKit (`turn.external_tls = true`) by default.
|
||||||
|
|
||||||
|
To disable this behavior, set `livekit_server_config_turn_external_tls: false` and the playbook will revert to the old behavior - using traefik-certs-dumper to extract SSL certificates out of Traefik and pass them to LiveKit for explicit SSL termination there.
|
||||||
|
|
||||||
|
If you are using `other-traefik-container` or [another reverse-proxy](./configuring-playbook-own-webserver.md), this change does **not** switch behavior automatically. That mode remains using certificate files in the container (Traefik certificates dumper flow) unless you explicitly set the TURN-Traefik mode variables to opt in.
|
||||||
|
|
||||||
|
# 2026-02-17
|
||||||
|
|
||||||
|
## (BC Break) prometheus-nginxlog-exporter role has been relocated and variable names need adjustments
|
||||||
|
|
||||||
|
The role for prometheus-nginxlog-exporter has been relocated to the [mother-of-all-self-hosting](https://github.com/mother-of-all-self-hosting) organization.
|
||||||
|
|
||||||
|
Along with the relocation, the `matrix_prometheus_nginxlog_exporter_` prefix on its variable names has been renamed to `prometheus_nginxlog_exporter_`, so you need to adjust your `vars.yml` configuration.
|
||||||
|
|
||||||
|
As always, the playbook would let you know about this and point out any variables you may have missed.
|
||||||
|
|
||||||
|
## synapse-auto-invite-accept has been removed from the playbook
|
||||||
|
|
||||||
|
[synapse-auto-invite-accept](./docs/configuring-playbook-synapse-auto-accept-invite.md) has been removed from the playbook, as the same functionality [has been integrated](https://github.com/element-hq/synapse/pull/17147) to Synapse since [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0).
|
||||||
|
|
||||||
|
See [this section](./docs/configuring-playbook-synapse-auto-accept-invite.md#native-alternative) for details about how to enable the function on Synapse.
|
||||||
|
|
||||||
|
If you're using any `matrix_synapse_ext_synapse_auto_accept_invite_*` variables, the playbook will let you know which one you'll need to remove from `vars.yml`.
|
||||||
|
|
||||||
|
# 2026-02-16
|
||||||
|
|
||||||
|
## matrix-appservice-slack has been removed from the playbook
|
||||||
|
|
||||||
|
[matrix-appservice-slack](./docs/configuring-playbook-bridge-appservice-slack.md) has been removed from the playbook, as it has been discontinued because the public Matrix.org Slack bridge has been decommissioned on January 14th, 2026.
|
||||||
|
|
||||||
|
The playbook will let you know if you're using any `matrix_appservice_slack_*` variables. You'll need to remove them from `vars.yml` and potentially [uninstall the component manually](./docs/configuring-playbook-bridge-appservice-slack.md#uninstalling-the-component-manually).
|
||||||
|
|
||||||
|
**Note**: Bridging to [Slack](https://slack.com) can also happen via the [mautrix-slack](./docs/configuring-playbook-bridge-mautrix-slack.md) bridge supported by the playbook.
|
||||||
|
|
||||||
# 2026-02-13
|
# 2026-02-13
|
||||||
|
|
||||||
## Conditional service restart for `install-*` commands
|
## Conditional service restart for `install-*` commands
|
||||||
@@ -694,8 +847,8 @@ If upstream synapse-admin picks up the pace and improves, the etke.cc fork may d
|
|||||||
If you'd like to switch back to the original synapse-admin software, you can do so by adding the following configuration to your `vars.yml` file:
|
If you'd like to switch back to the original synapse-admin software, you can do so by adding the following configuration to your `vars.yml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matrix_synapse_admin_docker_image: "{{ matrix_synapse_admin_docker_image_registry_prefix }}awesometechnologies/synapse-admin:{{ matrix_synapse_admin_version }}"
|
matrix_synapse_admin_container_image: "{{ matrix_synapse_admin_container_image_registry_prefix }}awesometechnologies/synapse-admin:{{ matrix_synapse_admin_version }}"
|
||||||
matrix_synapse_admin_docker_image_registry_prefix_upstream: docker.io/
|
matrix_synapse_admin_container_image_registry_prefix_upstream: docker.io/
|
||||||
|
|
||||||
matrix_synapse_admin_version: 0.10.3
|
matrix_synapse_admin_version: 0.10.3
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ Web clients for Matrix that you can host on your own domains.
|
|||||||
| [Element Web](https://github.com/element-hq/element-web) | ✅ | Default Matrix web client, configured to connect to your own Synapse server | [Link](docs/configuring-playbook-client-element-web.md) |
|
| [Element Web](https://github.com/element-hq/element-web) | ✅ | Default Matrix web client, configured to connect to your own Synapse server | [Link](docs/configuring-playbook-client-element-web.md) |
|
||||||
| [Hydrogen](https://github.com/element-hq/hydrogen-web) | ❌ | Lightweight Matrix client with legacy and mobile browser support | [Link](docs/configuring-playbook-client-hydrogen.md) |
|
| [Hydrogen](https://github.com/element-hq/hydrogen-web) | ❌ | Lightweight Matrix client with legacy and mobile browser support | [Link](docs/configuring-playbook-client-hydrogen.md) |
|
||||||
| [Cinny](https://github.com/ajbura/cinny) | ❌ | Simple, elegant and secure web client | [Link](docs/configuring-playbook-client-cinny.md) |
|
| [Cinny](https://github.com/ajbura/cinny) | ❌ | Simple, elegant and secure web client | [Link](docs/configuring-playbook-client-cinny.md) |
|
||||||
|
| [Sable](https://github.com/7w1/sable) | ❌ | Simple, elegant and secure web client | [Link](docs/configuring-playbook-client-sable.md) |
|
||||||
| [SchildiChat Web](https://schildi.chat/) | ❌ | Based on Element Web, with a more traditional instant messaging experience | [Link](docs/configuring-playbook-client-schildichat-web.md) |
|
| [SchildiChat Web](https://schildi.chat/) | ❌ | Based on Element Web, with a more traditional instant messaging experience | [Link](docs/configuring-playbook-client-schildichat-web.md) |
|
||||||
| [FluffyChat Web](https://fluffychat.im/) | ❌ | The cutest messenger in Matrix | [Link](docs/configuring-playbook-client-fluffychat-web.md) |
|
| [FluffyChat Web](https://fluffychat.im/) | ❌ | The cutest messenger in Matrix | [Link](docs/configuring-playbook-client-fluffychat-web.md) |
|
||||||
|
|
||||||
@@ -74,13 +75,12 @@ Services that run on the server to make the various parts of your installation w
|
|||||||
| Name | Default? | Description | Documentation |
|
| Name | Default? | Description | Documentation |
|
||||||
| ---- | -------- | ----------- | ------------- |
|
| ---- | -------- | ----------- | ------------- |
|
||||||
| [PostgreSQL](https://www.postgresql.org/)| ✅ | Database for Synapse. [Using an external PostgreSQL server](docs/configuring-playbook-external-postgres.md) is also possible. | [Link](docs/configuring-playbook-external-postgres.md) |
|
| [PostgreSQL](https://www.postgresql.org/)| ✅ | Database for Synapse. [Using an external PostgreSQL server](docs/configuring-playbook-external-postgres.md) is also possible. | [Link](docs/configuring-playbook-external-postgres.md) |
|
||||||
| [coturn](https://github.com/coturn/coturn) | ✅ | STUN/TURN server for WebRTC audio/video calls | [Link](docs/configuring-playbook-turn.md) |
|
|
||||||
| [Traefik](https://doc.traefik.io/traefik/) | ✅ | Web server, listening on ports 80, 443 and 8448 - standing in front of all the other services. [Using your own webserver](docs/configuring-playbook-own-webserver.md) is also possible. | [Link](docs/configuring-playbook-traefik.md) |
|
| [Traefik](https://doc.traefik.io/traefik/) | ✅ | Web server, listening on ports 80, 443 and 8448 - standing in front of all the other services. [Using your own webserver](docs/configuring-playbook-own-webserver.md) is also possible. | [Link](docs/configuring-playbook-traefik.md) |
|
||||||
| [Let's Encrypt](https://letsencrypt.org/) | ✅ | Free SSL certificate, which secures the connection to all components | [Link](docs/configuring-playbook-ssl-certificates.md) |
|
| [Let's Encrypt](https://letsencrypt.org/) | ✅ | Free SSL certificate, which secures the connection to all components | [Link](docs/configuring-playbook-ssl-certificates.md) |
|
||||||
| [Exim](https://www.exim.org/) | ✅ | Mail server, through which all Matrix services send outgoing email (can be configured to relay through another SMTP server) | [Link](docs/configuring-playbook-email.md) |
|
| [Exim](https://www.exim.org/) | ✅ | Mail server, through which all Matrix services send outgoing email (can be configured to relay through another SMTP server) | [Link](docs/configuring-playbook-email.md) |
|
||||||
|
| [coturn](https://github.com/coturn/coturn) | ❌ | STUN/TURN server for WebRTC audio/video calls | [Link](docs/configuring-playbook-turn.md) |
|
||||||
| [ddclient](https://github.com/linuxserver/docker-ddclient) | ❌ | Dynamic DNS | [Link](docs/configuring-playbook-dynamic-dns.md) |
|
| [ddclient](https://github.com/linuxserver/docker-ddclient) | ❌ | Dynamic DNS | [Link](docs/configuring-playbook-dynamic-dns.md) |
|
||||||
| [LiveKit Server](https://github.com/livekit/livekit) | ❌ | WebRTC server for audio/video calls | [Link](docs/configuring-playbook-livekit-server.md) |
|
| Matrix RTC stack | ❌ | Supporting components ([LiveKit Server](docs/configuring-playbook-livekit-server.md) and [LiveKit JWT Service](docs/configuring-playbook-livekit-jwt-service.md)) for in-app audio/video calls for Matrix clients | [Link](docs/configuring-playbook-matrix-rtc.md) |
|
||||||
| [Livekit JWT Service](https://github.com/livekit/livekit-jwt-service) | ❌ | JWT service for integrating [Element Call](./configuring-playbook-element-call.md) with [LiveKit Server](./configuring-playbook-livekit-server.md) | [Link](docs/configuring-playbook-livekit-jwt-service.md) |
|
|
||||||
|
|
||||||
### Authentication
|
### Authentication
|
||||||
|
|
||||||
@@ -127,7 +127,6 @@ Bridges can be used to connect your Matrix installation with third-party communi
|
|||||||
| [matrix-appservice-irc](https://github.com/matrix-org/matrix-appservice-irc) | ❌ | Bridge to [IRC](https://wikipedia.org/wiki/Internet_Relay_Chat) | [Link](docs/configuring-playbook-bridge-appservice-irc.md) |
|
| [matrix-appservice-irc](https://github.com/matrix-org/matrix-appservice-irc) | ❌ | 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) | ❌ | Bridge to [Kakaotalk](https://www.kakaocorp.com/page/service/service/KakaoTalk?lang=ENG) | [Link](docs/configuring-playbook-bridge-appservice-kakaotalk.md) |
|
| [matrix-appservice-kakaotalk](https://src.miscworks.net/fair/matrix-appservice-kakaotalk) | ❌ | 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) | ❌ | Bridge to [Discord](https://discordapp.com/) | [Link](docs/configuring-playbook-bridge-appservice-discord.md) |
|
| [matrix-appservice-discord](https://github.com/matrix-org/matrix-appservice-discord) | ❌ | 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) | ❌ | Bridge to [Slack](https://slack.com/) | [Link](docs/configuring-playbook-bridge-appservice-slack.md) |
|
|
||||||
| [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) | ❌ | 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-hookshot](https://github.com/matrix-org/matrix-hookshot) | ❌ | 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) | ❌ | Bridge to SMS | [Link](docs/configuring-playbook-bridge-matrix-bridge-sms.md) |
|
| [matrix-sms-bridge](https://github.com/benkuly/matrix-sms-bridge) | ❌ | Bridge to SMS | [Link](docs/configuring-playbook-bridge-matrix-bridge-sms.md) |
|
||||||
| [matrix-steam-bridge](https://github.com/jasonlaguidice/matrix-steam-bridge) | ❌ | Bridge to [Steam](https://steampowered.com/) | [Link](docs/configuring-playbook-bridge-steam.md) |
|
| [matrix-steam-bridge](https://github.com/jasonlaguidice/matrix-steam-bridge) | ❌ | Bridge to [Steam](https://steampowered.com/) | [Link](docs/configuring-playbook-bridge-steam.md) |
|
||||||
@@ -172,7 +171,6 @@ Various services that don't fit any other categories.
|
|||||||
|
|
||||||
| Name | Default? | Description | Documentation |
|
| Name | Default? | Description | Documentation |
|
||||||
| ---- | -------- | ----------- | ------------- |
|
| ---- | -------- | ----------- | ------------- |
|
||||||
| [synapse_auto_accept_invite](https://github.com/matrix-org/synapse-auto-accept-invite) | ❌ | Synapse module to automatically accept invites | [Link](docs/configuring-playbook-synapse-auto-accept-invite.md) |
|
|
||||||
| [synapse_auto_compressor](https://github.com/matrix-org/rust-synapse-compress-state/#automated-tool-synapse_auto_compressor) | ❌ | Cli tool that automatically compresses `state_groups` database table in background | [Link](docs/configuring-playbook-synapse-auto-compressor.md) |
|
| [synapse_auto_compressor](https://github.com/matrix-org/rust-synapse-compress-state/#automated-tool-synapse_auto_compressor) | ❌ | Cli tool that automatically compresses `state_groups` database table in background | [Link](docs/configuring-playbook-synapse-auto-compressor.md) |
|
||||||
| [Matrix Corporal](https://github.com/devture/matrix-corporal) (advanced) | ❌ | Reconciliator and gateway for a managed Matrix server | [Link](docs/configuring-playbook-matrix-corporal.md) |
|
| [Matrix Corporal](https://github.com/devture/matrix-corporal) (advanced) | ❌ | Reconciliator and gateway for a managed Matrix server | [Link](docs/configuring-playbook-matrix-corporal.md) |
|
||||||
| [Matrix.to](https://github.com/matrix-org/matrix.to) | ❌ | Simple URL redirection service for the Matrix ecosystem | [Link](docs/configuring-playbook-matrixto.md) |
|
| [Matrix.to](https://github.com/matrix-org/matrix.to) | ❌ | Simple URL redirection service for the Matrix ecosystem | [Link](docs/configuring-playbook-matrixto.md) |
|
||||||
|
|||||||
35
bin/check-examples-vars-migration-version.sh
Executable file
35
bin/check-examples-vars-migration-version.sh
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# SPDX-FileCopyrightText: 2026 Slavi Pantaleev
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
# Ensures that the migration validated version in examples/vars.yml
|
||||||
|
# matches the expected version in the matrix_playbook_migration role defaults.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
defaults_file="roles/custom/matrix_playbook_migration/defaults/main.yml"
|
||||||
|
examples_file="examples/vars.yml"
|
||||||
|
|
||||||
|
expected_version=$(grep -oP '^matrix_playbook_migration_expected_version:\s*"?\K[^"]+' "$defaults_file")
|
||||||
|
examples_version=$(grep -oP '^matrix_playbook_migration_validated_version:\s*"?\K[^"]+' "$examples_file")
|
||||||
|
|
||||||
|
if [ -z "$expected_version" ]; then
|
||||||
|
echo "ERROR: Could not extract matrix_playbook_migration_expected_version from $defaults_file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$examples_version" ]; then
|
||||||
|
echo "ERROR: Could not extract matrix_playbook_migration_validated_version from $examples_file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$expected_version" != "$examples_version" ]; then
|
||||||
|
echo "ERROR: Migration version mismatch!"
|
||||||
|
echo " $defaults_file has expected version: $expected_version"
|
||||||
|
echo " $examples_file has validated version: $examples_version"
|
||||||
|
echo ""
|
||||||
|
echo "Please update $examples_file to match."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
0
bin/rebuild-mautrix-meta-instagram.sh
Normal file → Executable file
0
bin/rebuild-mautrix-meta-instagram.sh
Normal file → Executable file
@@ -39,16 +39,35 @@ Depending on your current `vars.yml` file and desired configuration, **you may r
|
|||||||
|
|
||||||
To enable the bot, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
To enable the bot, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
||||||
|
|
||||||
|
Authentication can be configured in one of two mutually-exclusive ways:
|
||||||
|
|
||||||
|
- **Password authentication** (`matrix_bot_baibot_config_user_password`) - recommended for most playbook-managed setups, because it integrates with automatic user creation flow used by the playbook, and auto-creates the bot account
|
||||||
|
- **Access-token authentication** (`matrix_bot_baibot_config_user_access_token` + `matrix_bot_baibot_config_user_device_id`) - useful for specific [Matrix Authentication Service](configuring-playbook-matrix-authentication-service.md)/OIDC setups where password authentication is not available or not desired
|
||||||
|
|
||||||
|
Even when [Matrix Authentication Service](configuring-playbook-matrix-authentication-service.md) is enabled, password authentication is still typically the best fit for baibot if you're using a playbook-managed bot account.
|
||||||
|
|
||||||
|
For upstream details, see baibot's [🔐 Authentication](https://github.com/etkecc/baibot/blob/main/docs/configuration/authentication.md) documentation.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matrix_bot_baibot_enabled: true
|
matrix_bot_baibot_enabled: true
|
||||||
|
|
||||||
# Uncomment and adjust this part if you'd like to use a username different than the default
|
# Uncomment and adjust this part if you'd like to use a username different than the default
|
||||||
# matrix_bot_baibot_config_user_mxid_localpart: baibot
|
# matrix_bot_baibot_config_user_mxid_localpart: baibot
|
||||||
|
|
||||||
|
# Authentication mode (choose exactly one):
|
||||||
|
#
|
||||||
|
# 1) Password authentication (recommended for most setups)
|
||||||
# Generate a strong password for the bot. You can create one with a command like `pwgen -s 64 1`.
|
# Generate a strong password for the bot. You can create one with a command like `pwgen -s 64 1`.
|
||||||
# If you'd like to change this password subsequently, see the details below.
|
# If you'd like to change this password subsequently, see the details below.
|
||||||
matrix_bot_baibot_config_user_password: 'PASSWORD_FOR_THE_BOT'
|
matrix_bot_baibot_config_user_password: 'PASSWORD_FOR_THE_BOT'
|
||||||
|
|
||||||
|
# 2) Access-token authentication (for MAS/OIDC-enabled homeservers)
|
||||||
|
# matrix_bot_baibot_config_user_access_token: 'YOUR_MAS_COMPATIBILITY_TOKEN_HERE'
|
||||||
|
# matrix_bot_baibot_config_user_device_id: 'BAIBOT'
|
||||||
|
#
|
||||||
|
# You can generate a compatibility token for MAS with:
|
||||||
|
# mas-cli manage issue-compatibility-token <username> [device_id]
|
||||||
|
|
||||||
# An optional passphrase to use for backing up and recovering the bot's encryption keys.
|
# An optional passphrase to use for backing up and recovering the bot's encryption keys.
|
||||||
# You can create one with a command like `pwgen -s 64 1`.
|
# You can create one with a command like `pwgen -s 64 1`.
|
||||||
#
|
#
|
||||||
@@ -387,13 +406,15 @@ ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-use
|
|||||||
|
|
||||||
**Notes**:
|
**Notes**:
|
||||||
|
|
||||||
- The `ensure-matrix-users-created` playbook tag makes the playbook automatically create the bot's user account.
|
- The `ensure-matrix-users-created` playbook tag makes the playbook automatically create the bot's user account when password authentication is used.
|
||||||
|
|
||||||
|
- If you're using access-token authentication, the bot account must already exist and the configured token + device ID must match that account. This mode is mainly for MAS/OIDC setups where password-based bot login is not suitable.
|
||||||
|
|
||||||
- The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`
|
- The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`
|
||||||
|
|
||||||
`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed.
|
`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed.
|
||||||
|
|
||||||
- If you change the bot password (`matrix_bot_baibot_config_user_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_baibot_config_user_password` to let the bot know its new password.
|
- If you change the bot password (`matrix_bot_baibot_config_user_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_baibot_config_user_password` to let the bot know its new password. (This note applies to password authentication mode.)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
@@ -1,157 +1,38 @@
|
|||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2019 - 2022 MDAD project contributors
|
SPDX-FileCopyrightText: 2019 Edgars Voroboks
|
||||||
|
SPDX-FileCopyrightText: 2019 Eduardo Beltrame
|
||||||
|
SPDX-FileCopyrightText: 2019-2025 MDAD project contributors
|
||||||
|
SPDX-FileCopyrightText: 2019-2025 Slavi Pantaleev
|
||||||
|
SPDX-FileCopyrightText: 2020 Chris van Dijk
|
||||||
|
SPDX-FileCopyrightText: 2020 Tulir Asokan
|
||||||
SPDX-FileCopyrightText: 2020 Udo Rader
|
SPDX-FileCopyrightText: 2020 Udo Rader
|
||||||
SPDX-FileCopyrightText: 2021 - 2024 Slavi Pantaleev
|
SPDX-FileCopyrightText: 2020 jens quade
|
||||||
SPDX-FileCopyrightText: 2021 Joel Bennett
|
SPDX-FileCopyrightText: 2021 Joel Bennett
|
||||||
SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
|
SPDX-FileCopyrightText: 2022 Dennis Ciba
|
||||||
|
SPDX-FileCopyrightText: 2022 Kim Brose
|
||||||
|
SPDX-FileCopyrightText: 2022 Travis Ralston
|
||||||
|
SPDX-FileCopyrightText: 2022 Vladimir Panteleev
|
||||||
|
SPDX-FileCopyrightText: 2022 Yan Minagawa
|
||||||
SPDX-FileCopyrightText: 2024 Fabio Bonelli
|
SPDX-FileCopyrightText: 2024 Fabio Bonelli
|
||||||
|
SPDX-FileCopyrightText: 2024-2026 Suguru Hirahara
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# Setting up Appservice Slack bridging (optional)
|
# Setting up Appservice Slack bridging (optional, removed)
|
||||||
|
|
||||||
**Notes**:
|
🪦 The playbook used to be able to install and configure [matrix-appservice-slack](https://github.com/matrix-org/matrix-appservice-slack), but no longer includes this component, as it had been unavailable for new installation since 2024, and was finally abandoned because the public Matrix.org Slack bridge has been decommissioned on January 14th, 2026.
|
||||||
- Bridging to [Slack](https://slack.com) can also happen via the [mautrix-slack](configuring-playbook-bridge-mautrix-slack.md) bridge 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.
|
**Note**: Bridging to [Slack](https://slack.com) can also happen via the [mautrix-slack](configuring-playbook-bridge-mautrix-slack.md) bridge supported by the playbook.
|
||||||
|
|
||||||
See the project's [documentation](https://github.com/matrix-org/matrix-appservice-slack/blob/master/README.md) to learn what it does and why it might be useful to you.
|
## Uninstalling the component manually
|
||||||
|
|
||||||
## Prerequisites
|
If you still have matrix-appservice-slack installed on your Matrix server, the playbook can no longer help you uninstall it and you will need to do it manually. To uninstall manually, run these commands on the server:
|
||||||
|
|
||||||
### Create a Classic Slack App
|
|
||||||
|
|
||||||
First, you need to create a Classic Slack App [here](https://api.slack.com/apps?new_classic_app=1).
|
|
||||||
|
|
||||||
Name the app "matrixbot" (or anything else you'll remember). Select the team/workspace this app will belong to. Click on bot users and add a new bot user. We will use this account to bridge the the rooms.
|
|
||||||
|
|
||||||
Then, click on Event Subscriptions and enable them and use the request url: `https://matrix.example.com/appservice-slack`.
|
|
||||||
|
|
||||||
Add the following events as `Bot User Events` and save:
|
|
||||||
|
|
||||||
- team_domain_change
|
|
||||||
- message.channels
|
|
||||||
- message.groups (if you want to bridge private channels)
|
|
||||||
- reaction_added
|
|
||||||
- reaction_removed
|
|
||||||
|
|
||||||
Next, click on "OAuth & Permissions" and add the following scopes:
|
|
||||||
|
|
||||||
- chat:write:bot
|
|
||||||
- users:read
|
|
||||||
- reactions:write
|
|
||||||
- files:write:user (if you want to bridge files)
|
|
||||||
|
|
||||||
**Note**: In order to make Slack files visible to Matrix users, this bridge will make Slack files visible to anyone with the url (including files in private channels). This is different than the current behavior in Slack, which only allows authenticated access to media posted in private channels. See MSC701 for details.
|
|
||||||
|
|
||||||
Click on "Install App" and "Install App to Workspace". Note the access tokens shown. You will need the Bot User OAuth Access Token and if you want to bridge files, the OAuth Access Token whenever you link a room.
|
|
||||||
|
|
||||||
### Create an administration control room on Matrix
|
|
||||||
|
|
||||||
Create a new Matrix room to act as the administration control room.
|
|
||||||
|
|
||||||
Note its internal room ID. This can be done in Element Web by sending a message, opening the options for that message and choosing "view source". The room ID will be displayed near the top.
|
|
||||||
|
|
||||||
## Adjusting the playbook configuration
|
|
||||||
|
|
||||||
To enable the bridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
matrix_appservice_slack_enabled: true
|
|
||||||
matrix_appservice_slack_control_room_id: "Your Matrix admin room ID"
|
|
||||||
|
|
||||||
# Uncomment to enable puppeting (optional, but recommended)
|
|
||||||
# matrix_appservice_slack_puppeting_enabled: true
|
|
||||||
# matrix_appservice_slack_puppeting_slackapp_client_id: "Your Classic Slack App Client ID"
|
|
||||||
# matrix_appservice_slack_puppeting_slackapp_client_secret: "Your Classic Slack App Client Secret"
|
|
||||||
|
|
||||||
# Uncomment to enable Team Sync (optional)
|
|
||||||
# See https://matrix-appservice-slack.readthedocs.io/en/latest/team_sync/
|
|
||||||
# matrix_appservice_slack_team_sync_enabled: true
|
|
||||||
```
|
|
||||||
|
|
||||||
### Extending the configuration
|
|
||||||
|
|
||||||
There are some additional things you may wish to configure about the bridge.
|
|
||||||
|
|
||||||
Take a look at:
|
|
||||||
|
|
||||||
- `roles/custom/matrix-bridge-appservice-slack/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
|
|
||||||
- `roles/custom/matrix-bridge-appservice-slack/templates/config.yaml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_appservice_slack_configuration_extension_yaml` variable
|
|
||||||
|
|
||||||
For example, to change the bot's username from `slackbot`, add the following configuration to your `vars.yml` file. Replace `examplebot` with your own.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
matrix_appservice_slack_configuration_extension_yaml: |
|
|
||||||
bot_username: "examplebot"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Installing
|
|
||||||
|
|
||||||
After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
|
|
||||||
|
|
||||||
<!-- NOTE: let this conservative command run (instead of install-all) to make it clear that failure of the command means something is clearly broken. -->
|
|
||||||
```sh
|
```sh
|
||||||
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
|
systemctl disable --now matrix-appservice-slack.service
|
||||||
|
|
||||||
|
rm -rf /matrix/appservice-slack
|
||||||
|
|
||||||
|
/matrix/postgres/bin/cli-non-interactive -c 'DROP DATABASE matrix_appservice_slack;'
|
||||||
```
|
```
|
||||||
|
|
||||||
The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`
|
|
||||||
|
|
||||||
`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
To use the bridge, you need to send `/invite @slackbot:example.com` to invite the bridge bot user into the admin room.
|
|
||||||
|
|
||||||
If Team Sync is not enabled, for each channel you would like to bridge, perform the following steps:
|
|
||||||
|
|
||||||
- Create a Matrix room in the usual manner for your client. Take a note of its Matrix room ID — it will look something like `!qporfwt:example.com`.
|
|
||||||
- Invite the bot user to both the Slack and Matrix channels you would like to bridge using `/invite @matrixbot` for Slack and `/invite @slackbot:example.com` for Matrix.
|
|
||||||
- Determine the "channel ID" that Slack uses to identify the channel. You can see it when you open a given Slack channel in a browser. The URL reads like this: `https://app.slack.com/client/XXX/<the channel ID>/details/`.
|
|
||||||
- Issue a link command in the administration control room with these collected values as arguments:
|
|
||||||
|
|
||||||
with file bridging:
|
|
||||||
|
|
||||||
```
|
|
||||||
link --channel_id CHANNELID --room !qporfwt:example.com --slack_bot_token xoxb-xxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx --slack_user_token xoxp-xxxxxxxx-xxxxxxxxx-xxxxxxxx-xxxxxxxx
|
|
||||||
```
|
|
||||||
|
|
||||||
without file bridging:
|
|
||||||
|
|
||||||
```
|
|
||||||
link --channel_id CHANNELID --room !qporfwt:example.com --slack_bot_token xoxb-xxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx
|
|
||||||
```
|
|
||||||
|
|
||||||
These arguments can be shortened to single-letter forms:
|
|
||||||
|
|
||||||
```
|
|
||||||
link -I CHANNELID -R !qporfwt:example.com -t xoxb-xxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx
|
|
||||||
```
|
|
||||||
|
|
||||||
### Unlinking
|
|
||||||
|
|
||||||
Channels can be unlinked again by sending this:
|
|
||||||
|
|
||||||
```
|
|
||||||
unlink --room !qporfwt:example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
Unlinking doesn't only disconnect the bridge, but also makes the slackbot leave the bridged Matrix room. So in case you want to re-link later, don't forget to re-invite the slackbot into this room again.
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-appservice-slack`.
|
|
||||||
|
|
||||||
### Linking: "Room is now pending-name"
|
|
||||||
|
|
||||||
This typically means that you haven't used the correct Slack channel ID. Unlink the room and recheck 'Determine the "channel ID"' from above.
|
|
||||||
|
|
||||||
### Messages work from Matrix to Slack, but not the other way around
|
|
||||||
|
|
||||||
Check the logs, and if you find the message like below, unlink your room, reinvite the bot and re-link it again.
|
|
||||||
|
|
||||||
`WARN SlackEventHandler Ignoring message from unrecognised Slack channel ID : %s (%s) <the channel ID> <some other ID>`
|
|
||||||
|
|
||||||
This may particularly hit you, if you tried to unsuccessfully link your room multiple times without unlinking it after each failed attempt.
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2018 - 2024 Slavi Pantaleev
|
|
||||||
SPDX-FileCopyrightText: 2018 Hugues Morisset
|
SPDX-FileCopyrightText: 2018 Hugues Morisset
|
||||||
SPDX-FileCopyrightText: 2021 - 2022 MDAD project contributors
|
SPDX-FileCopyrightText: 2018-2024 Slavi Pantaleev
|
||||||
|
SPDX-FileCopyrightText: 2021, 2022 MDAD project contributors
|
||||||
SPDX-FileCopyrightText: 2022 Abílio Costa
|
SPDX-FileCopyrightText: 2022 Abílio Costa
|
||||||
SPDX-FileCopyrightText: 2022 Dennis Ciba
|
SPDX-FileCopyrightText: 2022 Dennis Ciba
|
||||||
SPDX-FileCopyrightText: 2022 Marko Weltzer
|
SPDX-FileCopyrightText: 2022 Marko Weltzer
|
||||||
SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
|
SPDX-FileCopyrightText: 2024-2026 Suguru Hirahara
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
-->
|
-->
|
||||||
@@ -24,6 +24,8 @@ See the project's [documentation](https://docs.mau.fi/bridges/go/discord/index.h
|
|||||||
|
|
||||||
There are 3 ways to login to discord using this bridge, either by [scanning a QR code](https://docs.mau.fi/bridges/go/discord/authentication.html#qr-login) using the Discord mobile app, by using a [Discord token](https://docs.mau.fi/bridges/go/discord/authentication.html#token-login), **or** by using a [Discord bot token](https://docs.mau.fi/bridges/go/discord/authentication.html#bot-token-login).
|
There are 3 ways to login to discord using this bridge, either by [scanning a QR code](https://docs.mau.fi/bridges/go/discord/authentication.html#qr-login) using the Discord mobile app, by using a [Discord token](https://docs.mau.fi/bridges/go/discord/authentication.html#token-login), **or** by using a [Discord bot token](https://docs.mau.fi/bridges/go/discord/authentication.html#bot-token-login).
|
||||||
|
|
||||||
|
⚠️ QR code login is considered a self-bot and is forbidden by Discord. It can result in an account termination. See the [Discord policy](https://support.discord.com/hc/en-us/articles/115002192352-Automated-User-Accounts-Self-Bots).
|
||||||
|
|
||||||
### Enable Appservice Double Puppet or Shared Secret Auth (optional)
|
### Enable Appservice Double Puppet or Shared Secret Auth (optional)
|
||||||
|
|
||||||
If you want to set up [Double Puppeting](https://docs.mau.fi/bridges/general/double-puppeting.html) (hint: you most likely do) for this bridge automatically, you need to have enabled [Appservice Double Puppet](configuring-playbook-appservice-double-puppet.md) or [Shared Secret Auth](configuring-playbook-shared-secret-auth.md) service for this playbook.
|
If you want to set up [Double Puppeting](https://docs.mau.fi/bridges/general/double-puppeting.html) (hint: you most likely do) for this bridge automatically, you need to have enabled [Appservice Double Puppet](configuring-playbook-appservice-double-puppet.md) or [Shared Secret Auth](configuring-playbook-shared-secret-auth.md) service for this playbook.
|
||||||
@@ -98,4 +100,5 @@ matrix_mautrix_discord_logging_level: 'debug'
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Command requires room admin rights when user is creator
|
### Command requires room admin rights when user is creator
|
||||||
|
|
||||||
[MSC4289](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/4289-privilege-creators.md), introduced in [room version 12](https://spec.matrix.org/unstable/rooms/v12/), gives creators an infinitley high powerlevel. At the time of implementation, mautrix-discord and similar applications may not identify creators as or above admins. Either a separate admin user will need to manage the bridge or the room version should be less than version 12.
|
[MSC4289](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/4289-privilege-creators.md), introduced in [room version 12](https://spec.matrix.org/unstable/rooms/v12/), gives creators an infinitley high powerlevel. At the time of implementation, mautrix-discord and similar applications may not identify creators as or above admins. Either a separate admin user will need to manage the bridge or the room version should be less than version 12.
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
|
|
||||||
<sup>Refer the common guide for configuring mautrix bridges: [Setting up a Generic Mautrix Bridge](configuring-playbook-bridge-mautrix-bridges.md)</sup>
|
<sup>Refer the common guide for configuring mautrix bridges: [Setting up a Generic Mautrix Bridge](configuring-playbook-bridge-mautrix-bridges.md)</sup>
|
||||||
|
|
||||||
**Note**: bridging to [Slack](https://slack.com/) can also happen via the [matrix-appservice-slack](configuring-playbook-bridge-appservice-slack.md) bridge supported by the playbook.
|
|
||||||
- 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.
|
The playbook can install and configure [mautrix-slack](https://github.com/mautrix/slack) for you.
|
||||||
|
|
||||||
See the project's [documentation](https://docs.mau.fi/bridges/go/slack/index.html) to learn what it does and why it might be useful to you.
|
See the project's [documentation](https://docs.mau.fi/bridges/go/slack/index.html) to learn what it does and why it might be useful to you.
|
||||||
@@ -25,7 +21,7 @@ See the [features and roadmap](https://github.com/mautrix/slack/blob/main/ROADMA
|
|||||||
|
|
||||||
For using this bridge, you would need to authenticate by **providing your username and password** (legacy) or by using a **token login**. See more information in the [docs](https://docs.mau.fi/bridges/go/slack/authentication.html).
|
For using this bridge, you would need to authenticate by **providing your username and password** (legacy) or by using a **token login**. See more information in the [docs](https://docs.mau.fi/bridges/go/slack/authentication.html).
|
||||||
|
|
||||||
Note that neither of these methods are officially supported by Slack. [matrix-appservice-slack](configuring-playbook-bridge-appservice-slack.md) uses a Slack bot account which is the only officially supported method for bridging a Slack channel.
|
Note that neither of these methods are officially supported by Slack.
|
||||||
|
|
||||||
### Enable Appservice Double Puppet (optional)
|
### Enable Appservice Double Puppet (optional)
|
||||||
|
|
||||||
|
|||||||
71
docs/configuring-playbook-client-sable.md
Normal file
71
docs/configuring-playbook-client-sable.md
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2022 MDAD project contributors
|
||||||
|
SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
|
||||||
|
SPDX-FileCopyrightText: 2024 - 2026 Slavi Pantaleev
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Setting up Sable (optional)
|
||||||
|
|
||||||
|
The playbook can install and configure the [Sable](https://github.com/7w1/sable) Matrix web client for you.
|
||||||
|
|
||||||
|
Sable is a web client focusing primarily on simple, elegant and secure interface. It can be installed alongside or instead of [Element Web](./configuring-playbook-client-element-web.md), [Cinny](./configuring-playbook-client-cinny.md) and others.
|
||||||
|
|
||||||
|
## Adjusting DNS records
|
||||||
|
|
||||||
|
By default, this playbook installs Sable on the `sable.` subdomain (`sable.example.com`) and requires you to create a CNAME record for `sable`, which targets `matrix.example.com`.
|
||||||
|
|
||||||
|
When setting, replace `example.com` with your own.
|
||||||
|
|
||||||
|
## Adjusting the playbook configuration
|
||||||
|
|
||||||
|
To enable Sable, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
sable_enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adjusting the Sable URL (optional)
|
||||||
|
|
||||||
|
By tweaking the `sable_hostname` variable, you can easily make the service available at a **different hostname** than the default one.
|
||||||
|
|
||||||
|
Example additional configuration for your `vars.yml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Switch to a different domain (`app.example.com`) than the default one (`sable.example.com`)
|
||||||
|
sable_hostname: "app.{{ matrix_domain }}"
|
||||||
|
|
||||||
|
# Expose under the /sable subpath
|
||||||
|
# sable_path_prefix: /sable
|
||||||
|
```
|
||||||
|
|
||||||
|
After changing the domain, **you may need to adjust your DNS** records to point the Sable domain to the Matrix server.
|
||||||
|
|
||||||
|
**Note**: while there is a `sable_path_prefix` variable for changing the path where Sable is served, overriding it is [not possible](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3701), because Sable requires an application rebuild (with a tweaked build config) to be functional under a custom path. You'd need to serve Sable at a dedicated subdomain.
|
||||||
|
|
||||||
|
### Extending the configuration
|
||||||
|
|
||||||
|
There are some additional things you may wish to configure about the component.
|
||||||
|
|
||||||
|
Take a look at:
|
||||||
|
|
||||||
|
- `roles/galaxy/sable/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
|
||||||
|
- `roles/galaxy/sable/templates/config.json.j2` for the component's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `sable_configuration_extension_json` variable
|
||||||
|
|
||||||
|
## Installing
|
||||||
|
|
||||||
|
After configuring the playbook and [adjusting your DNS records](#adjusting-dns-records), run the playbook with [playbook tags](playbook-tags.md) as below:
|
||||||
|
|
||||||
|
<!-- NOTE: let this conservative command run (instead of install-all) to make it clear that failure of the command means something is clearly broken. -->
|
||||||
|
```sh
|
||||||
|
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
|
||||||
|
```
|
||||||
|
|
||||||
|
The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`
|
||||||
|
|
||||||
|
`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-client-sable`.
|
||||||
@@ -58,9 +58,14 @@ matrix_continuwuity_environment_variables_extension: |
|
|||||||
|
|
||||||
Unlike other homeserver implementations (like Synapse and Dendrite), continuwuity does not support creating users via the command line or via the playbook.
|
Unlike other homeserver implementations (like Synapse and Dendrite), continuwuity does not support creating users via the command line or via the playbook.
|
||||||
|
|
||||||
If you followed the instructions above (see [Adjusting the playbook configuration](#adjusting-the-playbook-configuration)), you should have registration enabled and protected by a registration token.
|
On first startup, Continuwuity creates a special one-time-use registration token and logs it to the server's console. To access this, you will need to SSH into the server and run the following command:
|
||||||
|
|
||||||
This should allow you to create the first user account via any client (like [Element Web](./configuring-playbook-client-element-web.md)) which supports creating users.
|
```sh
|
||||||
|
# Adjust the duration if necessary or remove the whole --since argument
|
||||||
|
journalctl -u matrix-continuwuity.service --since="10 minutes ago"
|
||||||
|
```
|
||||||
|
|
||||||
|
Find the token, highlight it, and copy it (ctrl+shift+C). This token should allow you to create the first user account via any client (like [Element Web](./configuring-playbook-client-element-web.md)) which supports creating users.
|
||||||
|
|
||||||
The **first user account that you create will be marked as an admin** and **will be automatically invited to an admin room**.
|
The **first user account that you create will be marked as an admin** and **will be automatically invited to an admin room**.
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,16 @@ The [Ansible role for exim-relay](https://github.com/mother-of-all-self-hosting/
|
|||||||
- 🌐 [the role's documentation at the MASH project](https://github.com/mother-of-all-self-hosting/ansible-role-exim-relay/blob/main/docs/configuring-exim-relay.md) online
|
- 🌐 [the role's documentation at the MASH project](https://github.com/mother-of-all-self-hosting/ansible-role-exim-relay/blob/main/docs/configuring-exim-relay.md) online
|
||||||
- 📁 `roles/galaxy/exim_relay/docs/configuring-exim-relay.md` locally, if you have [fetched the Ansible roles](installing.md#update-ansible-roles)
|
- 📁 `roles/galaxy/exim_relay/docs/configuring-exim-relay.md` locally, if you have [fetched the Ansible roles](installing.md#update-ansible-roles)
|
||||||
|
|
||||||
|
## Why use exim-relay?
|
||||||
|
|
||||||
|
**Benefits of using exim-relay** instead of configuring SMTP directly in each service:
|
||||||
|
|
||||||
|
1. **Final delivery capability**: Can deliver emails directly if you don't have an SMTP server
|
||||||
|
|
||||||
|
2. **Centralized configuration**: Configure your upstream SMTP server once in exim-relay, then point all services ([Synapse](configuring-playbook-synapse.md), [Matrix Authentication Service](configuring-playbook-matrix-authentication-service.md), etc.) there—no need to configure SMTP in each component
|
||||||
|
|
||||||
|
3. **Local spooling**: Stores messages locally and retries delivery if your upstream SMTP server is temporarily unavailable
|
||||||
|
|
||||||
## Firewall settings
|
## Firewall settings
|
||||||
|
|
||||||
No matter whether you send email directly (the default) or you relay email through another host, you'll probably need to allow outgoing traffic for TCP ports 25/587 (depending on configuration).
|
No matter whether you send email directly (the default) or you relay email through another host, you'll probably need to allow outgoing traffic for TCP ports 25/587 (depending on configuration).
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
|
|
||||||
The playbook can install and configure the [Jitsi](https://jitsi.org/) video-conferencing platform for you.
|
The playbook can install and configure the [Jitsi](https://jitsi.org/) video-conferencing platform for you.
|
||||||
|
|
||||||
|
Because Jitsi still requires a TURN server, enabling Jitsi
|
||||||
|
automatically enables coturn (`coturn_enabled: true`) unless you explicitly disable it.
|
||||||
|
|
||||||
Jitsi is an open source video-conferencing platform. It can not only be integrated with Element clients ([Element Web](configuring-playbook-client-element-web.md)/Desktop, Android and iOS) as a widget, but also be used as standalone web app.
|
Jitsi is an open source video-conferencing platform. It can not only be integrated with Element clients ([Element Web](configuring-playbook-client-element-web.md)/Desktop, Android and iOS) as a widget, but also be used as standalone web app.
|
||||||
|
|
||||||
💡 If you're into experimental technology, you may also be interested in trying out [Element Call](configuring-playbook-element-call.md) - a native Matrix video conferencing application.
|
💡 If you're into experimental technology, you may also be interested in trying out [Element Call](configuring-playbook-element-call.md) - a native Matrix video conferencing application.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ LiveKit Server is an open source project that provides scalable, multi-user conf
|
|||||||
|
|
||||||
The [Ansible role for LiveKit Server](https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server) is developed and maintained by [the MASH (mother-of-all-self-hosting) project](https://github.com/mother-of-all-self-hosting). For details about configuring LiveKit Server, you can check them via:
|
The [Ansible role for LiveKit Server](https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server) is developed and maintained by [the MASH (mother-of-all-self-hosting) project](https://github.com/mother-of-all-self-hosting). For details about configuring LiveKit Server, you can check them via:
|
||||||
- 🌐 [the role's documentation at the MASH project](https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server/blob/main/docs/configuring-livekit-server.md) online
|
- 🌐 [the role's documentation at the MASH project](https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server/blob/main/docs/configuring-livekit-server.md) online
|
||||||
- 📁 `roles/galaxy/livekit-server/docs/configuring-livekit-server.md` locally, if you have [fetched the Ansible roles](installing.md#update-ansible-roles)
|
- 📁 `roles/galaxy/livekit_server/docs/configuring-livekit-server.md` locally, if you have [fetched the Ansible roles](installing.md#update-ansible-roles)
|
||||||
|
|
||||||
## Adjusting firewall rules
|
## Adjusting firewall rules
|
||||||
|
|
||||||
@@ -29,10 +29,43 @@ To ensure LiveKit Server functions correctly, the following firewall rules and p
|
|||||||
|
|
||||||
- `5350/tcp`: TURN/TCP. Also see the [Limitations](#limitations) section below.
|
- `5350/tcp`: TURN/TCP. Also see the [Limitations](#limitations) section below.
|
||||||
|
|
||||||
💡 The suggestions above are inspired by the upstream [Ports and Firewall](https://docs.livekit.io/home/self-hosting/ports-firewall/) documentation based on how LiveKit is configured in the playbook. If you've using custom configuration for the LiveKit Server role, you may need to adjust the firewall rules accordingly.
|
- `30000-30020/udp`: TURN relay range used by LiveKit's embedded TURN server.
|
||||||
|
|
||||||
|
💡 The suggestions above are inspired by the upstream [Ports and Firewall](https://docs.livekit.io/home/self-hosting/ports-firewall/) documentation based on how LiveKit is configured in the playbook. If you're using custom configuration for the LiveKit Server role, you may need to adjust firewall rules accordingly.
|
||||||
|
|
||||||
|
## TURN TLS handling
|
||||||
|
|
||||||
|
When `matrix_playbook_reverse_proxy_type` is `playbook-managed-traefik` (which is the default for this playbook), TURN over TCP is terminated by Traefik and forwarded to LiveKit with `turn.external_tls = true`. In this playbook default, this mode is enabled automatically when SSL is enabled and TURN is enabled.
|
||||||
|
|
||||||
|
- The playbook installs a dedicated Traefik TCP entrypoint for TURN (`matrix-livekit-turn`) by default and binds it to `tcp/5350`.
|
||||||
|
- `livekit_server_config_turn_external_tls` is automatically enabled for this setup.
|
||||||
|
- Because Traefik handles TLS, LiveKit no longer needs certificate-file paths for TURN in this mode.
|
||||||
|
|
||||||
|
To opt out and keep TURN TLS termination in LiveKit itself, set:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
livekit_server_config_turn_external_tls: false
|
||||||
|
```
|
||||||
|
|
||||||
|
In this playbook, certificate paths are managed automatically via `group_vars/matrix_servers` when certificate dumping is enabled.
|
||||||
|
|
||||||
|
If your setup uses `other-traefik-container` or [another reverse-proxy](./configuring-playbook-own-webserver.md), behavior is unchanged by default and still relies on certificates being available inside the container as before.
|
||||||
|
|
||||||
|
Deployments using `other-traefik-container` can opt into the same Traefik-terminated mode there, by setting:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
livekit_server_config_turn_external_tls: true
|
||||||
|
livekit_server_container_labels_turn_traefik_enabled: true
|
||||||
|
livekit_server_container_labels_turn_traefik_entrypoints: "<your-livekit-turn-traffic-entrypoint>"
|
||||||
|
```
|
||||||
|
|
||||||
|
and configuring their own Traefik TCP entrypoint dedicated to LiveKit TURN traffic.
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
For some reason, LiveKit Server's TURN ports (`3479/udp` and `5350/tcp`) are not reachable over IPv6 regardless of whether you've [enabled IPv6](./configuring-ipv6.md) for your server.
|
LiveKit Server's TURN listener behavior depends on where TLS is terminated:
|
||||||
|
|
||||||
It seems like LiveKit Server intentionally only listens on `udp4` and `tcp4` as seen [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L128) and [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L92).
|
- Direct LiveKit TURN listeners (`livekit_server_config_turn_external_tls: false`) still use IPv4-only sockets for `3479/udp` and `5350/tcp`, so IPv6 connectivity to these endpoints is not possible.
|
||||||
|
- With [TURN TLS handling](#turn-tls-handling) (`livekit_server_config_turn_external_tls: true`), the playbook's dedicated `matrix-livekit-turn` TCP entrypoint can still listen on both IPv4 and IPv6. Traefik then forwards TURN/TCP to LiveKit.
|
||||||
|
|
||||||
|
It appears that LiveKit Server intentionally only listens on `udp4` and `tcp4` in direct mode, as seen [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L128) and [here](https://github.com/livekit/livekit/blob/154b4d26b769c68a03c096124094b97bf61a996f/pkg/service/turn.go#L92).
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ The Matrix RTC stack is a set of supporting components ([LiveKit Server](configu
|
|||||||
|
|
||||||
- A [Synapse](configuring-playbook-synapse.md) homeserver (see the warning below)
|
- A [Synapse](configuring-playbook-synapse.md) homeserver (see the warning below)
|
||||||
- Various experimental features for the Synapse homeserver which Element Call [requires](https://github.com/element-hq/element-call/blob/93ae2aed9841e0b066d515c56bd4c122d2b591b2/docs/self-hosting.md#a-matrix-homeserver) (automatically done when Element Call is enabled)
|
- Various experimental features for the Synapse homeserver which Element Call [requires](https://github.com/element-hq/element-call/blob/93ae2aed9841e0b066d515c56bd4c122d2b591b2/docs/self-hosting.md#a-matrix-homeserver) (automatically done when Element Call is enabled)
|
||||||
- A [LiveKit Server](configuring-playbook-livekit-server.md) (automatically installed when [Element Call or the Matrix RTC stack is enabled](#decide-between-element-call-vs-just-the-matrix-rtc-stack))
|
- A [LiveKit Server](configuring-playbook-livekit-server.md) (automatically installed when [Element Call or the Matrix RTC stack is enabled](configuring-playbook-element-call.md#decide-between-element-call-vs-just-the-matrix-rtc-stack))
|
||||||
- The [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md) (automatically installed when [Element Call or the Matrix RTC stack is enabled](#decide-between-element-call-vs-just-the-matrix-rtc-stack))
|
- The [LiveKit JWT Service](configuring-playbook-livekit-jwt-service.md) (automatically installed when [Element Call or the Matrix RTC stack is enabled](configuring-playbook-element-call.md#decide-between-element-call-vs-just-the-matrix-rtc-stack))
|
||||||
- A client compatible with Element Call. As of 2025-03-15, that's just [Element Web](configuring-playbook-client-element-web.md) and the Element X mobile clients (iOS and Android).
|
- A client compatible with Element Call. As of 2025-03-15, that's just [Element Web](configuring-playbook-client-element-web.md) and the Element X mobile clients (iOS and Android).
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ See the project's [documentation](https://github.com/martin-helmich/prometheus-n
|
|||||||
To enable it, add the following configuration to your `vars.yml` file:
|
To enable it, add the following configuration to your `vars.yml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matrix_prometheus_nginxlog_exporter_enabled: true
|
prometheus_nginxlog_exporter_enabled: true
|
||||||
```
|
```
|
||||||
|
|
||||||
If you enable Grafana, a dedicated `NGINX PROXY` Grafana dashboard will be created.
|
If you enable Grafana, a dedicated `NGINX PROXY` Grafana dashboard will be created.
|
||||||
@@ -95,8 +95,8 @@ If you enable Grafana, a dedicated `NGINX PROXY` Grafana dashboard will be creat
|
|||||||
At the moment of writing only images for `amd64` and `arm64` architectures are available. The playbook currently does not support [self-building](./self-building.md) a container image on other architectures. You can however use a custom-build image by setting:
|
At the moment of writing only images for `amd64` and `arm64` architectures are available. The playbook currently does not support [self-building](./self-building.md) a container image on other architectures. You can however use a custom-build image by setting:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matrix_prometheus_nginxlog_exporter_docker_image_arch_check_enabled: false
|
prometheus_nginxlog_exporter_container_image_arch_check_enabled: false
|
||||||
matrix_prometheus_nginxlog_exporter_docker_image: path/to/docker/image:tag
|
prometheus_nginxlog_exporter_container_image: path/to/docker/image:tag
|
||||||
```
|
```
|
||||||
|
|
||||||
### Extending the configuration
|
### Extending the configuration
|
||||||
@@ -106,7 +106,7 @@ There are some additional things you may wish to configure about Prometheus and
|
|||||||
Take a look at:
|
Take a look at:
|
||||||
|
|
||||||
- [Prometheus role](https://github.com/mother-of-all-self-hosting/ansible-role-prometheus)'s [`defaults/main.yml`](https://github.com/mother-of-all-self-hosting/ansible-role-prometheus/blob/main/defaults/main.yml) for some variables that you can customize via your `vars.yml` file. You can override settings (even those that don't have dedicated playbook variables) using the `prometheus_configuration_extension_yaml` variable
|
- [Prometheus role](https://github.com/mother-of-all-self-hosting/ansible-role-prometheus)'s [`defaults/main.yml`](https://github.com/mother-of-all-self-hosting/ansible-role-prometheus/blob/main/defaults/main.yml) for some variables that you can customize via your `vars.yml` file. You can override settings (even those that don't have dedicated playbook variables) using the `prometheus_configuration_extension_yaml` variable
|
||||||
- `roles/custom/matrix-prometheus-nginxlog-exporter/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
|
- `roles/galaxy/prometheus_nginxlog_exporter/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
|
||||||
|
|
||||||
## Adjusting the playbook configuration — Grafana
|
## Adjusting the playbook configuration — Grafana
|
||||||
|
|
||||||
@@ -178,11 +178,11 @@ Name | Description
|
|||||||
`matrix_metrics_exposure_http_basic_auth_enabled`|Set this to `true` to protect all `https://matrix.example.com/metrics/*` endpoints with [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) (see the other variables below for supplying the actual credentials).
|
`matrix_metrics_exposure_http_basic_auth_enabled`|Set this to `true` to protect all `https://matrix.example.com/metrics/*` endpoints with [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) (see the other variables below for supplying the actual credentials).
|
||||||
`matrix_metrics_exposure_http_basic_auth_users`|Set this to the Basic Authentication credentials (raw `htpasswd` file content) used to protect `/metrics/*`. This htpasswd-file needs to be generated with the `htpasswd` tool and can include multiple username/password pairs.
|
`matrix_metrics_exposure_http_basic_auth_users`|Set this to the Basic Authentication credentials (raw `htpasswd` file content) used to protect `/metrics/*`. This htpasswd-file needs to be generated with the `htpasswd` tool and can include multiple username/password pairs.
|
||||||
`prometheus_node_exporter_enabled`|Set this to `true` to enable the node (general system stats) exporter (locally, on the container network).
|
`prometheus_node_exporter_enabled`|Set this to `true` to enable the node (general system stats) exporter (locally, on the container network).
|
||||||
`prometheus_node_exporter_container_labels_traefik_enabled`|Set this to `true` to expose the node (general system stats) metrics on `https://matrix.example.com/metrics/node-exporter`.
|
`prometheus_node_exporter_container_labels_metrics_enabled`|Set this to `true` to expose the node (general system stats) metrics on `https://matrix.example.com/metrics/node-exporter`.
|
||||||
`prometheus_postgres_exporter_enabled`|Set this to `true` to enable the [Postgres exporter](#enable-metrics-and-graphs-for-postgres-optional) (locally, on the container network).
|
`prometheus_postgres_exporter_enabled`|Set this to `true` to enable the [Postgres exporter](#enable-metrics-and-graphs-for-postgres-optional) (locally, on the container network).
|
||||||
`prometheus_postgres_exporter_container_labels_traefik_enabled`|Set this to `true` to expose the [Postgres exporter](#enable-metrics-and-graphs-for-postgres-optional) metrics on `https://matrix.example.com/metrics/postgres-exporter`.
|
`prometheus_postgres_exporter_container_labels_metrics_enabled`|Set this to `true` to expose the [Postgres exporter](#enable-metrics-and-graphs-for-postgres-optional) metrics on `https://matrix.example.com/metrics/postgres-exporter`.
|
||||||
`matrix_prometheus_nginxlog_exporter_enabled`|Set this to `true` to enable the [nginx Log exporter](#enable-metrics-and-graphs-for-nginx-logs-optional) (locally, on the container network).
|
`prometheus_nginxlog_exporter_enabled`|Set this to `true` to enable the [prometheus-nginxlog-exporter](#enable-metrics-and-graphs-for-nginx-logs-optional) (locally, on the container network).
|
||||||
`matrix_prometheus_nginxlog_exporter_metrics_proxying_enabled`|Set this to `true` to expose the [nginx Log exporter](#enable-metrics-and-graphs-for-nginx-logs-optional) metrics on `https://matrix.example.com/metrics/nginxlog`.
|
`prometheus_nginxlog_exporter_container_labels_metrics_enabled`|Set this to `true` to expose the [prometheus-nginxlog-exporter](#enable-metrics-and-graphs-for-nginx-logs-optional) metrics on `https://matrix.example.com/metrics/nginxlog`.
|
||||||
|
|
||||||
### Expose metrics of other services/roles
|
### Expose metrics of other services/roles
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,26 @@
|
|||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2020 - 2024 MDAD project contributors
|
SPDX-FileCopyrightText: 2020-2024 MDAD project contributors
|
||||||
SPDX-FileCopyrightText: 2020 - 2024 Slavi Pantaleev
|
SPDX-FileCopyrightText: 2020-2024 Slavi Pantaleev
|
||||||
SPDX-FileCopyrightText: 2021 Aaron Raimist
|
SPDX-FileCopyrightText: 2021 Aaron Raimist
|
||||||
SPDX-FileCopyrightText: 2023 Christian González
|
SPDX-FileCopyrightText: 2023 Christian González
|
||||||
SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
|
|
||||||
SPDX-FileCopyrightText: 2024 Nikita Chernyi
|
SPDX-FileCopyrightText: 2024 Nikita Chernyi
|
||||||
SPDX-FileCopyrightText: 2024 Uğur İLTER
|
SPDX-FileCopyrightText: 2024 Uğur İLTER
|
||||||
|
SPDX-FileCopyrightText: 2024-2026 Suguru Hirahara
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# Setting up Synapse Admin (optional)
|
# Setting up Synapse Admin (optional)
|
||||||
|
|
||||||
The playbook can install and configure [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), community room: [#synapse-admin:etke.cc](https://matrix.to/#/#synapse-admin:etke.cc)) for you.
|
The playbook can install and configure Synapse Admin for you.
|
||||||
|
|
||||||
synapse-admin is a web UI tool you can use to **administrate users, rooms, media, etc. on your Matrix server**. It's designed to work with the Synapse homeserver implementation and WON'T work with Dendrite because [Dendrite Admin API](https://element-hq.github.io/dendrite/administration/adminapi) differs from [Synapse Admin API](https://element-hq.github.io/synapse/latest/usage/administration/admin_api/).
|
Synapse Admin is a web UI tool you can use to **administrate users, rooms, media, etc. on your Matrix homeserver**. This playbook is configured to install [etkecc/synapse-admin](https://github.com/etkecc/synapse-admin), which is a [feature-rich](https://github.com/etkecc/synapse-admin#fork-differences) fork of [Awesome-Technologies/synapse-admin](https://github.com/Awesome-Technologies/synapse-admin).
|
||||||
|
|
||||||
💡 **Note**: the latest version of synapse-admin is hosted by [etke.cc](https://etke.cc/) at [admin.etke.cc](https://admin.etke.cc/). If you only need this service occasionally and trust giving your admin credentials to a 3rd party Single Page Application, you can consider using it from there and avoiding the (small) overhead of self-hosting.
|
>[!NOTE]
|
||||||
|
>
|
||||||
💡 **Note**: The playbook also supports an alternative management UI in the shape of [Element Admin](./configuring-playbook-element-admin.md). However, it's currently less feature-rich than Synapse Admin and has a dependency on [Matrix Authentication Service](./configuring-playbook-matrix-authentication-service.md).
|
> - Synapse Admin does not work with other homeserver implementations than Synapse due to API's incompatibility.
|
||||||
|
> - The latest version of Synapse Admin is hosted by [etke.cc](https://etke.cc/) at [admin.etke.cc](https://admin.etke.cc/). If you only need this service occasionally and trust giving your admin credentials to a 3rd party Single Page Application, you can consider using it from there and avoiding the (small) overhead of self-hosting.
|
||||||
|
> - This playbook also supports an alternative management UI in the shape of [Element Admin](./configuring-playbook-element-admin.md). Please note that it's currently less feature-rich than Synapse Admin and requires [Matrix Authentication Service](./configuring-playbook-matrix-authentication-service.md).
|
||||||
|
|
||||||
## Adjusting DNS records (optional)
|
## Adjusting DNS records (optional)
|
||||||
|
|
||||||
@@ -87,3 +89,5 @@ To use Synapse Admin, you need to have [registered at least one administrator ac
|
|||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-synapse-admin`.
|
As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-synapse-admin`.
|
||||||
|
|
||||||
|
If you have questions, you can join this community room and feel free to ask: [#synapse-admin:etke.cc](https://matrix.to/#/#synapse-admin:etke.cc)
|
||||||
|
|||||||
@@ -1,45 +1,26 @@
|
|||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2024 MDAD project contributors
|
SPDX-FileCopyrightText: 2019 Eduardo Beltrame
|
||||||
SPDX-FileCopyrightText: 2024 Slavi Pantaleev
|
SPDX-FileCopyrightText: 2019-2025 Slavi Pantaleev
|
||||||
SPDX-FileCopyrightText: 2024 Suguru Hirahara
|
SPDX-FileCopyrightText: 2020 Tulir Asokan
|
||||||
|
SPDX-FileCopyrightText: 2021, 2024 MDAD project contributors
|
||||||
|
SPDX-FileCopyrightText: 2022 Dennis Ciba
|
||||||
|
SPDX-FileCopyrightText: 2022 Vladimir Panteleev
|
||||||
|
SPDX-FileCopyrightText: 2023 Justin Croonenberghs
|
||||||
|
SPDX-FileCopyrightText: 2023 Kuba Orlik
|
||||||
|
SPDX-FileCopyrightText: 2023 Pierre 'McFly' Marty
|
||||||
|
SPDX-FileCopyrightText: 2023 Samuel Meenzen
|
||||||
|
SPDX-FileCopyrightText: 2024 Fabio Bonelli
|
||||||
|
SPDX-FileCopyrightText: 2024-2026 Suguru Hirahara
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# Setting up Synapse Auto Invite Accept (optional)
|
# Setting up Synapse Auto Invite Accept (optional, removed)
|
||||||
|
|
||||||
The playbook can install and configure [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite) for you.
|
🪦 The playbook used to be able to install and configure [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite), but no longer includes this component, as the same functionality [has been integrated](https://github.com/element-hq/synapse/pull/17147) to Synapse since [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0).
|
||||||
|
|
||||||
In short, it automatically accepts room invites. You can specify that only 1:1 room invites are auto-accepted. Defaults to false if not specified.
|
|
||||||
|
|
||||||
See the project's [documentation](https://github.com/matrix-org/synapse-auto-accept-invite/blob/main/README.md) to learn what it does and why it might be useful to you.
|
|
||||||
|
|
||||||
**Note**: Synapse [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0), the same feature [has been merged](https://github.com/element-hq/synapse/pull/17147) into Synapse (see the [Native alternative](#native-alternative) section below). You'd better use the native feature, instead of the [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite) 3rd party module.
|
|
||||||
|
|
||||||
## Adjusting the playbook configuration
|
|
||||||
|
|
||||||
If you decide that you'd like to let this playbook install the [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite module for you, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
matrix_synapse_ext_synapse_auto_accept_invite_enabled: true
|
|
||||||
|
|
||||||
matrix_synapse_ext_synapse_auto_accept_invite_accept_invites_only_direct_messages: true
|
|
||||||
```
|
|
||||||
|
|
||||||
### Synapse worker deployments
|
|
||||||
|
|
||||||
In a [workerized Synapse deployment](https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/c9a842147e09647c355799ca024d65a5de66b099/docs/configuring-playbook-synapse.md#load-balancing-with-workers) it is possible to run this module on a worker to reduce the load on the main process (Default is `null`). For example, add this to your configuration:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
matrix_synapse_ext_synapse_auto_accept_invite_worker_to_run_on: 'matrix-synapse-worker-generic-0'
|
|
||||||
```
|
|
||||||
|
|
||||||
There might be an [issue with federation](https://github.com/matrix-org/synapse-auto-accept-invite/issues/18).
|
|
||||||
|
|
||||||
## Native alternative
|
## Native alternative
|
||||||
|
|
||||||
Since Synapse [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0), the functionality provided by the [synapse-auto-invite-accept](https://github.com/matrix-org/synapse-auto-accept-invite) 3rd party module [has been made](https://github.com/element-hq/synapse/pull/17147) part of Synapse.
|
|
||||||
|
|
||||||
Here's example configuration for using the **native** Synapse feature:
|
Here's example configuration for using the **native** Synapse feature:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -177,6 +177,8 @@ By default, we periodically ensure that all local files are uploaded to S3 and a
|
|||||||
- … invoked via the `matrix-synapse-s3-storage-provider-migrate.service` service
|
- … invoked via the `matrix-synapse-s3-storage-provider-migrate.service` service
|
||||||
- … triggered by the `matrix-synapse-s3-storage-provider-migrate.timer` timer, every day at 05:00
|
- … triggered by the `matrix-synapse-s3-storage-provider-migrate.timer` timer, every day at 05:00
|
||||||
|
|
||||||
|
The same `migrate` script also prunes empty directories in the local media repository (`remote_content` and `remote_thumbnail`) after upload/delete operations.
|
||||||
|
|
||||||
So… you don't need to perform any maintenance yourself.
|
So… you don't need to perform any maintenance yourself.
|
||||||
|
|
||||||
The schedule is defined in the format of systemd timer calendar. To edit the schedule, add the following configuration to your `vars.yml` file (adapt to your needs):
|
The schedule is defined in the format of systemd timer calendar. To edit the schedule, add the following configuration to your `vars.yml` file (adapt to your needs):
|
||||||
|
|||||||
@@ -76,10 +76,33 @@ The only thing you **cannot** do is mix [generic workers](#generic-workers) and
|
|||||||
|
|
||||||
When Synapse workers are enabled, the integrated [Postgres database is tuned](maintenance-postgres.md#tuning-postgresql), so that the maximum number of Postgres connections are increased from `200` to `500`. If you need to decrease or increase the number of maximum Postgres connections further, use the `postgres_max_connections` variable.
|
When Synapse workers are enabled, the integrated [Postgres database is tuned](maintenance-postgres.md#tuning-postgresql), so that the maximum number of Postgres connections are increased from `200` to `500`. If you need to decrease or increase the number of maximum Postgres connections further, use the `postgres_max_connections` variable.
|
||||||
|
|
||||||
A separate Ansible role (`matrix-synapse-reverse-proxy-companion`) and component handles load-balancing for workers. This role/component is automatically enabled when you enable workers. Make sure to use the `setup-all` tag (not `install-all`!) during the playbook's [installation](./installing.md) process, especially if you're disabling workers, so that components may be installed/uninstalled correctly.
|
The `matrix-synapse` role also manages the `matrix-synapse-reverse-proxy-companion` component for load-balancing with workers. This component is automatically enabled when you enable workers. Make sure to use the `setup-all` tag (not `install-all`!) during the playbook's [installation](./installing.md) process, especially if you're disabling workers, so that components may be installed/uninstalled correctly.
|
||||||
|
|
||||||
In case any problems occur, make sure to have a look at the [list of synapse issues about workers](https://github.com/element-hq/synapse/issues?q=workers+in%3Atitle) and your `journalctl --unit 'matrix-*'`.
|
In case any problems occur, make sure to have a look at the [list of synapse issues about workers](https://github.com/element-hq/synapse/issues?q=workers+in%3Atitle) and your `journalctl --unit 'matrix-*'`.
|
||||||
|
|
||||||
|
### Limit joining heavy rooms on constrained hosts
|
||||||
|
|
||||||
|
If your server is underpowered, joining heavy rooms can cause Synapse to consume a lot of resources and be unavailable for long (while it catches up).
|
||||||
|
|
||||||
|
To avoid this, Synapse can be configured to reject joins for remote rooms that are too complex before users enter them.
|
||||||
|
|
||||||
|
Complexity is computed as `current_state_events / 500` (Synapse state event count for current room state). When the resulting value is higher than `matrix_synapse_limit_remote_rooms_complexity` and `matrix_synapse_limit_remote_rooms_enabled` is `true`, Synapse blocks joining the room.
|
||||||
|
|
||||||
|
We recommend using this as a guardrail on low-resource servers:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
matrix_synapse_limit_remote_rooms_enabled: true
|
||||||
|
|
||||||
|
# Tweak as necessary
|
||||||
|
matrix_synapse_limit_remote_rooms_complexity: 1.0
|
||||||
|
|
||||||
|
# Uncomment and tweak if necessary
|
||||||
|
# matrix_synapse_limit_remote_rooms_complexity_error: "Your homeserver is unable to join rooms this large or complex. Please speak to your server administrator, or upgrade your instance to join this room."
|
||||||
|
|
||||||
|
# If you'd like your admins to be exempt from this limit, uncomment the line below
|
||||||
|
# matrix_synapse_limit_remote_rooms_admins_can_join: true
|
||||||
|
```
|
||||||
|
|
||||||
### Synapse + OpenID Connect for Single-Sign-On
|
### Synapse + OpenID Connect for Single-Sign-On
|
||||||
|
|
||||||
💡 An alternative to setting up OIDC in Synapse is to use [Matrix Authentication Service](./configuring-playbook-matrix-authentication-service.md) (MAS). Newer clients (like Element X) only support SSO-based authentication via MAS and not via the legacy Synapse OIDC setup described below. That said, MAS is still a new experimental service which comes with its own downsides. Consult its documentation to learn if it will be a good fit for your deployment.
|
💡 An alternative to setting up OIDC in Synapse is to use [Matrix Authentication Service](./configuring-playbook-matrix-authentication-service.md) (MAS). Newer clients (like Element X) only support SSO-based authentication via MAS and not via the legacy Synapse OIDC setup described below. That said, MAS is still a new experimental service which comes with its own downsides. Consult its documentation to learn if it will be a good fit for your deployment.
|
||||||
|
|||||||
@@ -13,34 +13,50 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
|
|
||||||
# Configuring a TURN server (optional, advanced)
|
# Configuring a TURN server (optional, advanced)
|
||||||
|
|
||||||
By default, this playbook installs and configures the [coturn](https://github.com/coturn/coturn) as a TURN server, through which clients can make audio/video calls even from [NAT](https://en.wikipedia.org/wiki/Network_address_translation)-ed networks. It also configures the Synapse chat server by default, so that it points to the coturn TURN server installed by the playbook. If that's okay, you can skip this document.
|
By default, the [coturn](https://github.com/coturn/coturn) TURN server component is enabled automatically only when [Jitsi](configuring-playbook-jitsi.md) is enabled. If you're not using Jitsi, coturn is not enabled by default.
|
||||||
|
|
||||||
If you'd like to stop the playbook installing the server, see the section [below](#disabling-coturn) to check the configuration for disabling it.
|
If you explicitly need coturn while not using Jitsi, enable it with:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
coturn_enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
and configure its IP-related settings in the section below.
|
||||||
|
|
||||||
|
If you'd like coturn to stay disabled even when Jitsi is enabled, or if you prefer to use an external TURN provider, see [disabling coturn](#disabling-coturn) section below.
|
||||||
|
|
||||||
|
When Coturn is not enabled, homeservers (like Synapse) would not point to TURN servers and *legacy* audio/video call functionality may fail. If you're using [Matrix RTC](configuring-playbook-matrix-rtc.md) (for [Element Call](configuring-playbook-element-call.md)), you likely don't have a need to enable coturn.
|
||||||
|
|
||||||
|
## Adjusting firewall rules
|
||||||
|
|
||||||
|
To ensure Coturn functions correctly, the following firewall rules and port forwarding settings are required when coturn is enabled:
|
||||||
|
|
||||||
|
- `3478/tcp`: STUN/TURN over TCP
|
||||||
|
- `3478/udp`: STUN/TURN over UDP
|
||||||
|
- `5349/tcp`: TURN over TCP
|
||||||
|
- `5349/udp`: TURN over UDP
|
||||||
|
- `49152-49172/udp`: TURN/UDP relay range
|
||||||
|
|
||||||
|
If LiveKit's embedded TURN is enabled at the same time (for MatrixRTC/Element Call), keep the Coturn relay range distinct from LiveKit's relay range (`livekit_server_config_turn_relay_range_start`/`livekit_server_config_turn_relay_range_end`).
|
||||||
|
|
||||||
|
💡 Docker configures the server's internal firewall for you. In most cases, you don't need to do anything special on the host itself.
|
||||||
|
|
||||||
## Adjusting the playbook configuration
|
## Adjusting the playbook configuration
|
||||||
|
|
||||||
### Define public IP manually (optional)
|
### Define public IP manually (optional)
|
||||||
|
|
||||||
In the `hosts` file we explicitly ask for your server's external IP address when defining `ansible_host`, because the same value is used for configuring coturn.
|
If you enable coturn (either via Jitsi or manually), we recommend that you configure the public IP addresses of your server in the `vars.yml` file:
|
||||||
|
|
||||||
If you'd rather use a local IP for `ansible_host`, add the following configuration to your `vars.yml` file. Make sure to replace `YOUR_PUBLIC_IP` with the pubic IP used by the server.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
coturn_turn_external_ip_address: "YOUR_PUBLIC_IP"
|
# You can define multiple IP addresses if your server has multiple external IP addresses
|
||||||
|
coturn_turn_external_ip_addresses: ["YOUR_PUBLIC_IP"]
|
||||||
```
|
```
|
||||||
|
|
||||||
If you'd like to rely on external IP address auto-detection (not recommended unless you need it), set an empty value to the variable. The playbook will automatically contact an [echoip](https://github.com/mpolden/echoip)-compatible service (`https://ifconfig.co/json` by default) to determine your server's IP address. This API endpoint is configurable via the `coturn_turn_external_ip_address_auto_detection_echoip_service_url` variable.
|
If you'd like to rely on external IP address auto-detection (not recommended unless you need it), avoid configuring this variable. The playbook will automatically contact an [echoip](https://github.com/mpolden/echoip)-compatible service (`https://ifconfig.co/json` by default) to determine your server's IP address. This API endpoint is configurable via the `coturn_turn_external_ip_address_auto_detection_echoip_service_url` variable.
|
||||||
|
|
||||||
>[!NOTE]
|
>[!NOTE]
|
||||||
> You can self-host the echoip service by using the [Mother-of-All-Self-Hosting (MASH)](https://github.com/mother-of-all-self-hosting/mash-playbook) Ansible playbook. See [this page](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/echoip.md) for the instruction to install it with the playbook. If you are wondering how to use it for your Matrix server, refer to [this page](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/setting-up-services-on-mdad-server.md) for the overview.
|
> You can self-host the echoip service by using the [Mother-of-All-Self-Hosting (MASH)](https://github.com/mother-of-all-self-hosting/mash-playbook) Ansible playbook. See [this page](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/echoip.md) for the instruction to install it with the playbook. If you are wondering how to use it for your Matrix server, refer to [this page](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/setting-up-services-on-mdad-server.md) for the overview.
|
||||||
|
|
||||||
If your server has multiple external IP addresses, the coturn role offers a different variable for specifying them:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# Note: coturn_turn_external_ip_addresses is different than coturn_turn_external_ip_address
|
|
||||||
coturn_turn_external_ip_addresses: ['1.2.3.4', '4.5.6.7']
|
|
||||||
```
|
|
||||||
|
|
||||||
### Change the authentication mechanism (optional)
|
### Change the authentication mechanism (optional)
|
||||||
|
|
||||||
The playbook uses the [`auth-secret` authentication method](https://github.com/coturn/coturn/blob/873cabd6a2e5edd7e9cc5662cac3ffe47fe87a8e/README.turnserver#L186-L199) by default, but you may switch to the [`lt-cred-mech` method](https://github.com/coturn/coturn/blob/873cabd6a2e5edd7e9cc5662cac3ffe47fe87a8e/README.turnserver#L178) which [some report](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3191) to be working better.
|
The playbook uses the [`auth-secret` authentication method](https://github.com/coturn/coturn/blob/873cabd6a2e5edd7e9cc5662cac3ffe47fe87a8e/README.turnserver#L186-L199) by default, but you may switch to the [`lt-cred-mech` method](https://github.com/coturn/coturn/blob/873cabd6a2e5edd7e9cc5662cac3ffe47fe87a8e/README.turnserver#L178) which [some report](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3191) to be working better.
|
||||||
@@ -119,14 +135,14 @@ Take a look at:
|
|||||||
|
|
||||||
## Disabling coturn
|
## Disabling coturn
|
||||||
|
|
||||||
If, for some reason, you'd like for the playbook to not install coturn (or to uninstall it if it was previously installed), add the following configuration to your `vars.yml` file:
|
Coturn is only enabled by default when [Jitsi](configuring-playbook-jitsi.md) is enabled. In most instances, you don't need to explicitly disable it.
|
||||||
|
|
||||||
|
To force the playbook to not install Coturn (even when Jitsi is enabled), add the following configuration to your `vars.yml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
coturn_enabled: false
|
coturn_enabled: false
|
||||||
```
|
```
|
||||||
|
|
||||||
In that case, Synapse would not point to any coturn servers and audio/video call functionality may fail.
|
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
|
After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ Web clients for Matrix that you can host on your own domains.
|
|||||||
|
|
||||||
- [Setting up Cinny](configuring-playbook-client-cinny.md), if you've enabled [Cinny](https://github.com/ajbura/cinny), a web client focusing primarily on simple, elegant and secure interface
|
- [Setting up Cinny](configuring-playbook-client-cinny.md), if you've enabled [Cinny](https://github.com/ajbura/cinny), a web client focusing primarily on simple, elegant and secure interface
|
||||||
|
|
||||||
|
- [Setting up Sable](configuring-playbook-client-sable.md), if you've enabled [Sable](https://github.com/7w1/sable), a web client focusing primarily on simple, elegant and secure interface
|
||||||
|
|
||||||
- [Setting up SchildiChat Web](configuring-playbook-client-schildichat-web.md), if you've enabled [SchildiChat Web](https://schildi.chat/), a web client based on [Element Web](https://element.io/) with some extras and tweaks
|
- [Setting up SchildiChat Web](configuring-playbook-client-schildichat-web.md), if you've enabled [SchildiChat Web](https://schildi.chat/), a web client based on [Element Web](https://element.io/) with some extras and tweaks
|
||||||
|
|
||||||
- [Setting up FluffyChat Web](configuring-playbook-client-fluffychat-web.md), if you've enabled [FluffyChat Web](https://github.com/krille-chan/fluffychat), a cute cross-platform messenger (web, iOS, Android) for Matrix written in [Flutter](https://flutter.dev/)
|
- [Setting up FluffyChat Web](configuring-playbook-client-fluffychat-web.md), if you've enabled [FluffyChat Web](https://github.com/krille-chan/fluffychat), a cute cross-platform messenger (web, iOS, Android) for Matrix written in [Flutter](https://flutter.dev/)
|
||||||
@@ -162,8 +164,6 @@ Bridges can be used to connect your Matrix installation with third-party communi
|
|||||||
|
|
||||||
- [Setting up Appservice Discord bridging](configuring-playbook-bridge-appservice-discord.md)
|
- [Setting up Appservice Discord bridging](configuring-playbook-bridge-appservice-discord.md)
|
||||||
|
|
||||||
- [Setting up Appservice Slack bridging](configuring-playbook-bridge-appservice-slack.md)
|
|
||||||
|
|
||||||
- [Setting up Appservice Kakaotalk bridging](configuring-playbook-bridge-appservice-kakaotalk.md)
|
- [Setting up Appservice Kakaotalk bridging](configuring-playbook-bridge-appservice-kakaotalk.md)
|
||||||
|
|
||||||
- [Setting up Beeper LinkedIn bridging](configuring-playbook-bridge-beeper-linkedin.md)
|
- [Setting up Beeper LinkedIn bridging](configuring-playbook-bridge-beeper-linkedin.md)
|
||||||
@@ -235,8 +235,6 @@ Various services that don't fit any other categories.
|
|||||||
|
|
||||||
- [Setting up Matrix RTC](configuring-playbook-matrix-rtc.md) (optional)
|
- [Setting up Matrix RTC](configuring-playbook-matrix-rtc.md) (optional)
|
||||||
|
|
||||||
- [Setting up Synapse Auto Invite Accept](configuring-playbook-synapse-auto-accept-invite.md)
|
|
||||||
|
|
||||||
- [Setting up synapse-auto-compressor](configuring-playbook-synapse-auto-compressor.md) for compressing the database on Synapse homeservers
|
- [Setting up synapse-auto-compressor](configuring-playbook-synapse-auto-compressor.md) for compressing the database on Synapse homeservers
|
||||||
|
|
||||||
- [Setting up Matrix Corporal](configuring-playbook-matrix-corporal.md) (advanced)
|
- [Setting up Matrix Corporal](configuring-playbook-matrix-corporal.md) (advanced)
|
||||||
@@ -263,6 +261,8 @@ Various services that don't fit any other categories.
|
|||||||
|
|
||||||
- [Setting up the Sliding Sync proxy](configuring-playbook-sliding-sync-proxy.md) for clients which require Sliding Sync support (like old Element X versions, before it got switched to Simplified Sliding Sync)
|
- [Setting up the Sliding Sync proxy](configuring-playbook-sliding-sync-proxy.md) for clients which require Sliding Sync support (like old Element X versions, before it got switched to Simplified Sliding Sync)
|
||||||
|
|
||||||
|
- [Setting up Appservice Slack bridging](configuring-playbook-bridge-appservice-slack.md) (removed; this component has been discontinued)
|
||||||
|
|
||||||
- [Setting up Appservice Webhooks bridging](configuring-playbook-bridge-appservice-webhooks.md) (deprecated; the bridge's author suggests taking a look at [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) as a replacement, which can also be [installed using this playbook](configuring-playbook-bridge-hookshot.md))
|
- [Setting up Appservice Webhooks bridging](configuring-playbook-bridge-appservice-webhooks.md) (deprecated; the bridge's author suggests taking a look at [matrix-hookshot](https://github.com/matrix-org/matrix-hookshot) as a replacement, which can also be [installed using this playbook](configuring-playbook-bridge-hookshot.md))
|
||||||
|
|
||||||
- [Setting up the Dimension integration manager](configuring-playbook-dimension.md) ([unmaintained](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2806#issuecomment-1673559299); after [installing](installing.md))
|
- [Setting up the Dimension integration manager](configuring-playbook-dimension.md) ([unmaintained](https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2806#issuecomment-1673559299); after [installing](installing.md))
|
||||||
@@ -290,3 +290,5 @@ Various services that don't fit any other categories.
|
|||||||
- [Setting up MX Puppet Slack bridging](configuring-playbook-bridge-mx-puppet-slack.md) (removed; this component has been unmaintained for a long time, so it has been removed from the playbook. Consider [setting up Mautrix Slack bridging](configuring-playbook-bridge-mautrix-slack.md))
|
- [Setting up MX Puppet Slack bridging](configuring-playbook-bridge-mx-puppet-slack.md) (removed; this component has been unmaintained for a long time, so it has been removed from the playbook. Consider [setting up Mautrix Slack bridging](configuring-playbook-bridge-mautrix-slack.md))
|
||||||
|
|
||||||
- [Setting up MX Puppet Twitter bridging](configuring-playbook-bridge-mx-puppet-twitter.md) (removed; this component has been unmaintained for a long time, so it has been removed from the playbook. Consider [setting up Mautrix Twitter bridging](configuring-playbook-bridge-mautrix-twitter.md))
|
- [Setting up MX Puppet Twitter bridging](configuring-playbook-bridge-mx-puppet-twitter.md) (removed; this component has been unmaintained for a long time, so it has been removed from the playbook. Consider [setting up Mautrix Twitter bridging](configuring-playbook-bridge-mautrix-twitter.md))
|
||||||
|
|
||||||
|
- [Setting up Synapse Auto Invite Accept](configuring-playbook-synapse-auto-accept-invite.md) (removed; since Synapse [v1.109.0](https://github.com/element-hq/synapse/releases/tag/v1.109.0) the same feature is available natively.)
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ Web clients for Matrix that you can host on your own domains.
|
|||||||
| [Element Web](configuring-playbook-client-element-web.md) | [vectorim/element-web](https://hub.docker.com/r/vectorim/element-web/) | ✅ | Default Matrix web client, configured to connect to your own Synapse server |
|
| [Element Web](configuring-playbook-client-element-web.md) | [vectorim/element-web](https://hub.docker.com/r/vectorim/element-web/) | ✅ | Default Matrix web client, configured to connect to your own Synapse server |
|
||||||
| [Hydrogen](configuring-playbook-client-hydrogen.md) | [element-hq/hydrogen-web](https://ghcr.io/element-hq/hydrogen-web) | ❌ | Lightweight Matrix client with legacy and mobile browser support |
|
| [Hydrogen](configuring-playbook-client-hydrogen.md) | [element-hq/hydrogen-web](https://ghcr.io/element-hq/hydrogen-web) | ❌ | Lightweight Matrix client with legacy and mobile browser support |
|
||||||
| [Cinny](configuring-playbook-client-cinny.md) | [ajbura/cinny](https://hub.docker.com/r/ajbura/cinny) | ❌ | Simple, elegant and secure web client |
|
| [Cinny](configuring-playbook-client-cinny.md) | [ajbura/cinny](https://hub.docker.com/r/ajbura/cinny) | ❌ | Simple, elegant and secure web client |
|
||||||
|
| [Sable](configuring-playbook-client-sable.md) | [7w1/sable](https://ghcr.io/7w1/sable) | ❌ | Simple, elegant and secure web client |
|
||||||
| [SchildiChat Web](configuring-playbook-client-schildichat-web.md) | [etke.cc/schildichat-web](https://ghcr.io/etkecc/schildichat-web) | ❌ | Based on Element Web, with a more traditional instant messaging experience |
|
| [SchildiChat Web](configuring-playbook-client-schildichat-web.md) | [etke.cc/schildichat-web](https://ghcr.io/etkecc/schildichat-web) | ❌ | Based on Element Web, with a more traditional instant messaging experience |
|
||||||
|
|
||||||
## Server Components
|
## Server Components
|
||||||
@@ -101,7 +102,6 @@ Bridges can be used to connect your Matrix installation with third-party communi
|
|||||||
| [matrix-appservice-irc](configuring-playbook-bridge-appservice-irc.md) | [matrixdotorg/matrix-appservice-irc](https://hub.docker.com/r/matrixdotorg/matrix-appservice-irc) | ❌ | Bridge to [IRC](https://wikipedia.org/wiki/Internet_Relay_Chat) |
|
| [matrix-appservice-irc](configuring-playbook-bridge-appservice-irc.md) | [matrixdotorg/matrix-appservice-irc](https://hub.docker.com/r/matrixdotorg/matrix-appservice-irc) | ❌ | Bridge to [IRC](https://wikipedia.org/wiki/Internet_Relay_Chat) |
|
||||||
| [matrix-appservice-kakaotalk](configuring-playbook-bridge-appservice-kakaotalk.md) | Self-building | ❌ | Bridge to [Kakaotalk](https://www.kakaocorp.com/page/service/service/KakaoTalk?lang=ENG) |
|
| [matrix-appservice-kakaotalk](configuring-playbook-bridge-appservice-kakaotalk.md) | Self-building | ❌ | Bridge to [Kakaotalk](https://www.kakaocorp.com/page/service/service/KakaoTalk?lang=ENG) |
|
||||||
| [matrix-appservice-discord](configuring-playbook-bridge-appservice-discord.md) | [matrix-org/matrix-appservice-discord](https://ghcr.io/matrix-org/matrix-appservice-discord) | ❌ | Bridge to [Discord](https://discordapp.com/) |
|
| [matrix-appservice-discord](configuring-playbook-bridge-appservice-discord.md) | [matrix-org/matrix-appservice-discord](https://ghcr.io/matrix-org/matrix-appservice-discord) | ❌ | Bridge to [Discord](https://discordapp.com/) |
|
||||||
| [matrix-appservice-slack](configuring-playbook-bridge-appservice-slack.md) | [matrixdotorg/matrix-appservice-slack](https://hub.docker.com/r/matrixdotorg/matrix-appservice-slack) | ❌ | Bridge to [Slack](https://slack.com/) |
|
|
||||||
| [matrix-hookshot](configuring-playbook-bridge-hookshot.md) | [halfshot/matrix-hookshot](https://hub.docker.com/r/halfshot/matrix-hookshot) | ❌ | Bridge for generic webhooks and multiple project management services, such as GitHub, GitLab, Figma, and Jira in particular |
|
| [matrix-hookshot](configuring-playbook-bridge-hookshot.md) | [halfshot/matrix-hookshot](https://hub.docker.com/r/halfshot/matrix-hookshot) | ❌ | Bridge for generic webhooks and multiple project management services, such as GitHub, GitLab, Figma, and Jira in particular |
|
||||||
| [matrix-sms-bridge](configuring-playbook-bridge-matrix-bridge-sms.md) | [folivonet/matrix-sms-bridge](https://hub.docker.com/repository/docker/folivonet/matrix-sms-bridge) | ❌ | Bridge to SMS |
|
| [matrix-sms-bridge](configuring-playbook-bridge-matrix-bridge-sms.md) | [folivonet/matrix-sms-bridge](https://hub.docker.com/repository/docker/folivonet/matrix-sms-bridge) | ❌ | Bridge to SMS |
|
||||||
| [matrix-wechat](configuring-playbook-bridge-wechat.md) | [lxduo/matrix-wechat](https://hub.docker.com/r/lxduo/matrix-wechat) | ❌ | Bridge to [WeChat](https://www.wechat.com/) |
|
| [matrix-wechat](configuring-playbook-bridge-wechat.md) | [lxduo/matrix-wechat](https://hub.docker.com/r/lxduo/matrix-wechat) | ❌ | Bridge to [WeChat](https://www.wechat.com/) |
|
||||||
@@ -150,7 +150,6 @@ Various services that don't fit any other categories.
|
|||||||
|
|
||||||
| Service | Container image | Default? | Description |
|
| Service | Container image | Default? | Description |
|
||||||
| ------- | --------------- | -------- | ----------- |
|
| ------- | --------------- | -------- | ----------- |
|
||||||
| [synapse_auto_accept_invite](configuring-playbook-synapse-auto-accept-invite.md) | (N/A) | ❌ | Synapse module to automatically accept invites |
|
|
||||||
| [synapse_auto_compressor](configuring-playbook-synapse-auto-compressor.md) | [mb-saces/rust-synapse-tools](https://gitlab.com/mb-saces/rust-synapse-tools/container_registry) | ❌ | Cli tool that automatically compresses Synapse's `state_groups` database table in background |
|
| [synapse_auto_compressor](configuring-playbook-synapse-auto-compressor.md) | [mb-saces/rust-synapse-tools](https://gitlab.com/mb-saces/rust-synapse-tools/container_registry) | ❌ | Cli tool that automatically compresses Synapse's `state_groups` database table in background |
|
||||||
| [Matrix Corporal](configuring-playbook-matrix-corporal.md) (advanced) | [devture/matrix-corporal](https://hub.docker.com/r/devture/matrix-corporal/) | ❌ | Reconciliator and gateway for a managed Matrix server |
|
| [Matrix Corporal](configuring-playbook-matrix-corporal.md) (advanced) | [devture/matrix-corporal](https://hub.docker.com/r/devture/matrix-corporal/) | ❌ | Reconciliator and gateway for a managed Matrix server |
|
||||||
| [Etherpad](configuring-playbook-etherpad.md) | [etherpad/etherpad](https://hub.docker.com/r/etherpad/etherpad/) | ❌ | Open source collaborative text editor |
|
| [Etherpad](configuring-playbook-etherpad.md) | [etherpad/etherpad](https://hub.docker.com/r/etherpad/etherpad/) | ❌ | Open source collaborative text editor |
|
||||||
@@ -176,6 +175,7 @@ The list of the deprecated or unmaintained services is available [here](configur
|
|||||||
| [Email2Matrix](configuring-playbook-email2matrix.md) | [devture/email2matrix](https://hub.docker.com/r/devture/email2matrix/) | ❌ | Bridge for relaying emails to Matrix rooms |
|
| [Email2Matrix](configuring-playbook-email2matrix.md) | [devture/email2matrix](https://hub.docker.com/r/devture/email2matrix/) | ❌ | Bridge for relaying emails to Matrix rooms |
|
||||||
| [Go-NEB](configuring-playbook-bot-go-neb.md) | [matrixdotorg/go-neb](https://hub.docker.com/r/matrixdotorg/go-neb) | ❌ | Multi functional bot written in Go |
|
| [Go-NEB](configuring-playbook-bot-go-neb.md) | [matrixdotorg/go-neb](https://hub.docker.com/r/matrixdotorg/go-neb) | ❌ | Multi functional bot written in Go |
|
||||||
| [ma1sd](configuring-playbook-ma1sd.md) | [ma1uta/ma1sd](https://hub.docker.com/r/ma1uta/ma1sd/) | ❌ | Matrix Identity Server |
|
| [ma1sd](configuring-playbook-ma1sd.md) | [ma1uta/ma1sd](https://hub.docker.com/r/ma1uta/ma1sd/) | ❌ | Matrix Identity Server |
|
||||||
|
| [matrix-appservice-slack](configuring-playbook-bridge-appservice-slack.md) | [matrixdotorg/matrix-appservice-slack](https://hub.docker.com/r/matrixdotorg/matrix-appservice-slack) | ❌ | Bridge to [Slack](https://slack.com/) |
|
||||||
| [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md) | [turt2live/matrix-appservice-webhooks](https://hub.docker.com/r/turt2live/matrix-appservice-webhooks) | ❌ | Bridge for slack compatible webhooks ([ConcourseCI](https://concourse-ci.org/), [Slack](https://slack.com/) etc. pp.) |
|
| [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md) | [turt2live/matrix-appservice-webhooks](https://hub.docker.com/r/turt2live/matrix-appservice-webhooks) | ❌ | Bridge for slack compatible webhooks ([ConcourseCI](https://concourse-ci.org/), [Slack](https://slack.com/) etc. pp.) |
|
||||||
| [matrix-chatgpt-bot](configuring-playbook-bot-chatgpt.md) | [matrixgpt/matrix-chatgpt-bot](https://ghcr.io/matrixgpt/matrix-chatgpt-bot) | ❌ | Accessing ChatGPT via your favourite Matrix client |
|
| [matrix-chatgpt-bot](configuring-playbook-bot-chatgpt.md) | [matrixgpt/matrix-chatgpt-bot](https://ghcr.io/matrixgpt/matrix-chatgpt-bot) | ❌ | Accessing ChatGPT via your favourite Matrix client |
|
||||||
| [mautrix-facebook](configuring-playbook-bridge-mautrix-facebook.md) | [mautrix/facebook](https://mau.dev/mautrix/facebook/container_registry) | ❌ | Bridge to [Facebook](https://facebook.com/) |
|
| [mautrix-facebook](configuring-playbook-bridge-mautrix-facebook.md) | [mautrix/facebook](https://mau.dev/mautrix/facebook/container_registry) | ❌ | Bridge to [Facebook](https://facebook.com/) |
|
||||||
@@ -185,3 +185,4 @@ The list of the deprecated or unmaintained services is available [here](configur
|
|||||||
| [mx-puppet-slack](configuring-playbook-bridge-mx-puppet-slack.md) | [mx-puppet/slack/mx-puppet-slack](https://gitlab.com/mx-puppet/slack/mx-puppet-slack/container_registry) | ❌ | Bridge to [Slack](https://slack.com) |
|
| [mx-puppet-slack](configuring-playbook-bridge-mx-puppet-slack.md) | [mx-puppet/slack/mx-puppet-slack](https://gitlab.com/mx-puppet/slack/mx-puppet-slack/container_registry) | ❌ | Bridge to [Slack](https://slack.com) |
|
||||||
| [mx-puppet-twitter](configuring-playbook-bridge-mx-puppet-twitter.md) | [sorunome/mx-puppet-twitter](https://hub.docker.com/r/sorunome/mx-puppet-twitter) | ❌ | Bridge for Twitter-DMs ([Twitter](https://twitter.com/)) |
|
| [mx-puppet-twitter](configuring-playbook-bridge-mx-puppet-twitter.md) | [sorunome/mx-puppet-twitter](https://hub.docker.com/r/sorunome/mx-puppet-twitter) | ❌ | Bridge for Twitter-DMs ([Twitter](https://twitter.com/)) |
|
||||||
| [sliding-sync](configuring-playbook-sliding-sync-proxy.md) | [matrix-org/sliding-sync](https://ghcr.io/matrix-org/sliding-sync) | ❌ | Sliding Sync support for clients which require it (like old Element X versions, before it got switched to Simplified Sliding Sync) |
|
| [sliding-sync](configuring-playbook-sliding-sync-proxy.md) | [matrix-org/sliding-sync](https://ghcr.io/matrix-org/sliding-sync) | ❌ | Sliding Sync support for clients which require it (like old Element X versions, before it got switched to Simplified Sliding Sync) |
|
||||||
|
| [synapse_auto_accept_invite](configuring-playbook-synapse-auto-accept-invite.md) | (N/A) | ❌ | Synapse module to automatically accept invites |
|
||||||
|
|||||||
27
docs/faq.md
27
docs/faq.md
@@ -305,18 +305,23 @@ See [Serving the base domain](configuring-playbook-base-domain-serving.md).
|
|||||||
|
|
||||||
### How do I optimize this setup for a low-power server?
|
### How do I optimize this setup for a low-power server?
|
||||||
|
|
||||||
|
For a low-power server, it's best to use an alternative homeserver implementation (other than [Synapse](configuring-playbook-synapse.md)).
|
||||||
|
|
||||||
You can disable some not-so-important services to save on memory.
|
You can disable some not-so-important services to save on memory.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Disabling this will prevent email-notifications and other such things from working.
|
# Disabling this will prevent email-notifications and other such things from working.
|
||||||
exim_relay_enabled: false
|
exim_relay_enabled: false
|
||||||
|
```
|
||||||
|
|
||||||
# You can also disable this to save more RAM,
|
If you've installed [Jitsi](configuring-playbook-jitsi.md) (not installed by default), there are additional optimizations listed on its documentation page that you can perform.
|
||||||
# at the expense of audio/video calls being unreliable.
|
|
||||||
coturn_enabled: false
|
|
||||||
|
|
||||||
# This makes Synapse not keep track of who is online/offline.
|
|
||||||
#
|
#### Synapse-specific optimizations
|
||||||
|
|
||||||
|
If you're using [Synapse](configuring-playbook-synapse.md), you can also consider the following optimizations:
|
||||||
|
|
||||||
|
```yaml
|
||||||
# Keeping track of this and announcing such online-status in federated rooms with
|
# Keeping track of this and announcing such online-status in federated rooms with
|
||||||
# hundreds of servers inside is insanely heavy (https://github.com/matrix-org/synapse/issues/3971).
|
# hundreds of servers inside is insanely heavy (https://github.com/matrix-org/synapse/issues/3971).
|
||||||
#
|
#
|
||||||
@@ -324,18 +329,14 @@ coturn_enabled: false
|
|||||||
matrix_synapse_presence_enabled: false
|
matrix_synapse_presence_enabled: false
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also consider implementing a restriction on room complexity, in order to prevent users from joining very heavy rooms:
|
You can also consider [implementing a restriction on room complexity](configuring-playbook-synapse.md#limit-joining-heavy-rooms-on-constrained-hosts), in order to prevent users from joining very heavy rooms:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matrix_synapse_configuration_extension_yaml: |
|
# See: docs/configuring-playbook-synapse.md#limit-joining-heavy-rooms-on-constrained-hosts
|
||||||
limit_remote_rooms:
|
matrix_synapse_limit_remote_rooms_enabled: true
|
||||||
enabled: true
|
matrix_synapse_limit_remote_rooms_complexity: 1.0
|
||||||
complexity: 1.0 # this limits joining complex (~large) rooms, can be
|
|
||||||
# increased, but larger values can require more RAM
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If you've installed [Jitsi](configuring-playbook-jitsi.md) (not installed by default), there are additional optimizations listed on its documentation page that you can perform.
|
|
||||||
|
|
||||||
### I already have Docker on my server. Can you stop installing Docker via the playbook?
|
### I already have Docker on my server. Can you stop installing Docker via the playbook?
|
||||||
|
|
||||||
Yes, we can stop installing Docker ourselves. Just use this in your `vars.yml` file:
|
Yes, we can stop installing Docker ourselves. Just use this in your `vars.yml` file:
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ After completing the installation, you can:
|
|||||||
- or learn how to [maintain your server](faq.md#maintenance)
|
- or learn how to [maintain your server](faq.md#maintenance)
|
||||||
- or join some Matrix rooms:
|
- or join some Matrix rooms:
|
||||||
* via the *Explore rooms* feature in Element Web or some other clients, or by discovering them using this [matrix-static list](https://view.matrix.org). **Note**: joining large rooms may overload small servers.
|
* via the *Explore rooms* feature in Element Web or some other clients, or by discovering them using this [matrix-static list](https://view.matrix.org). **Note**: joining large rooms may overload small servers.
|
||||||
|
For tuning guidance on constrained hosts, see [Limit joining heavy rooms on constrained hosts](configuring-playbook-synapse.md#limit-joining-heavy-rooms-on-constrained-hosts).
|
||||||
* or come say Hi in our support room — [#matrix-docker-ansible-deploy:devture.com](https://matrix.to/#/#matrix-docker-ansible-deploy:devture.com). You might learn something or get to help someone else new to Matrix hosting.
|
* or come say Hi in our support room — [#matrix-docker-ansible-deploy:devture.com](https://matrix.to/#/#matrix-docker-ansible-deploy:devture.com). You might learn something or get to help someone else new to Matrix hosting.
|
||||||
- or help make this playbook better by contributing (code, documentation, or [coffee/beer](https://liberapay.com/s.pantaleev/donate))
|
- or help make this playbook better by contributing (code, documentation, or [coffee/beer](https://liberapay.com/s.pantaleev/donate))
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ You should then be able to browse the adminer database administration GUI at htt
|
|||||||
|
|
||||||
Synapse's presence feature which tracks which users are online and which are offline can use a lot of processing power. You can disable presence by adding `matrix_synapse_presence_enabled: false` to your `vars.yml` file.
|
Synapse's presence feature which tracks which users are online and which are offline can use a lot of processing power. You can disable presence by adding `matrix_synapse_presence_enabled: false` to your `vars.yml` file.
|
||||||
|
|
||||||
|
On smaller servers, consider limiting joins to very complex rooms with [the room complexity guard](configuring-playbook-synapse.md#limit-joining-heavy-rooms-on-constrained-hosts).
|
||||||
|
|
||||||
If you have enough compute resources (CPU & RAM), you can make Synapse better use of them by [enabling load-balancing with workers](configuring-playbook-synapse.md#load-balancing-with-workers).
|
If you have enough compute resources (CPU & RAM), you can make Synapse better use of them by [enabling load-balancing with workers](configuring-playbook-synapse.md#load-balancing-with-workers).
|
||||||
|
|
||||||
[Tuning your PostgreSQL database](maintenance-postgres.md#tuning-postgresql) could also improve Synapse performance. The playbook tunes the integrated Postgres database automatically, but based on your needs you may wish to adjust tuning variables manually. If you're using an [external Postgres database](configuring-playbook-external-postgres.md), you will also need to tune Postgres manually.
|
[Tuning your PostgreSQL database](maintenance-postgres.md#tuning-postgresql) could also improve Synapse performance. The playbook tunes the integrated Postgres database automatically, but based on your needs you may wish to adjust tuning variables manually. If you're using an [external Postgres database](configuring-playbook-external-postgres.md), you will also need to tune Postgres manually.
|
||||||
|
|||||||
@@ -57,12 +57,7 @@ We will be using `example.com` as the domain in the following instruction. Pleas
|
|||||||
|
|
||||||
- `80/tcp`: HTTP webserver
|
- `80/tcp`: HTTP webserver
|
||||||
- `443/tcp` and `443/udp`: HTTPS webserver
|
- `443/tcp` and `443/udp`: HTTPS webserver
|
||||||
- `3478/tcp`: STUN/TURN over TCP (used by [coturn](./configuring-playbook-turn.md))
|
|
||||||
- `3478/udp`: STUN/TURN over UDP (used by [coturn](./configuring-playbook-turn.md))
|
|
||||||
- `5349/tcp`: TURN over TCP (used by [coturn](./configuring-playbook-turn.md))
|
|
||||||
- `5349/udp`: TURN over UDP (used by [coturn](./configuring-playbook-turn.md))
|
|
||||||
- `8448/tcp` and `8448/udp`: Matrix Federation API HTTPS webserver. Some components like [Matrix User Verification Service](configuring-playbook-user-verification-service.md#open-matrix-federation-port) require this port to be opened **even with federation disabled**.
|
- `8448/tcp` and `8448/udp`: Matrix Federation API HTTPS webserver. Some components like [Matrix User Verification Service](configuring-playbook-user-verification-service.md#open-matrix-federation-port) require this port to be opened **even with federation disabled**.
|
||||||
- the range `49152-49172/udp`: TURN over UDP
|
|
||||||
- potentially some other ports, depending on the additional (non-default) services that you enable in the **configuring the playbook** step (later on). Consult each service's documentation page in `docs/` for that.
|
- potentially some other ports, depending on the additional (non-default) services that you enable in the **configuring the playbook** step (later on). Consult each service's documentation page in `docs/` for that.
|
||||||
|
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ Possibly outdated list of roles where self-building the Docker image is currentl
|
|||||||
- `matrix-client-element`
|
- `matrix-client-element`
|
||||||
- `hydrogen`
|
- `hydrogen`
|
||||||
- `cinny`
|
- `cinny`
|
||||||
|
- `sable`
|
||||||
- `matrix-registration`
|
- `matrix-registration`
|
||||||
- `coturn`
|
- `coturn`
|
||||||
- `matrix-corporal`
|
- `matrix-corporal`
|
||||||
- `exim-relay`
|
- `exim-relay`
|
||||||
- `matrix-bridge-hookshot`
|
- `matrix-bridge-hookshot`
|
||||||
- `matrix-bridge-appservice-irc`
|
- `matrix-bridge-appservice-irc`
|
||||||
- `matrix-bridge-appservice-slack`
|
|
||||||
- `matrix-bridge-beeper-linkedin`
|
- `matrix-bridge-beeper-linkedin`
|
||||||
- `matrix-bridge-mautrix-googlechat`
|
- `matrix-bridge-mautrix-googlechat`
|
||||||
- `matrix-bridge-mautrix-telegram`
|
- `matrix-bridge-mautrix-telegram`
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# We explicitly ask for your server's external IP address, because the same value is used for configuring coturn.
|
|
||||||
# If you'd rather use a local IP here, make sure to set up `coturn_turn_external_ip_address`.
|
|
||||||
#
|
|
||||||
# To connect using a non-root user (and elevate to root with sudo later),
|
# To connect using a non-root user (and elevate to root with sudo later),
|
||||||
# replace `ansible_ssh_user=root` with something like this: `ansible_ssh_user=username ansible_become=true ansible_become_user=root`.
|
# replace `ansible_ssh_user=root` with something like this: `ansible_ssh_user=username ansible_become=true ansible_become_user=root`.
|
||||||
# If sudo requires a password, either add `ansible_become_password=PASSWORD_HERE` to the host line
|
# If sudo requires a password, either add `ansible_become_password=PASSWORD_HERE` to the host line
|
||||||
@@ -18,4 +15,4 @@
|
|||||||
# to the host line below.
|
# to the host line below.
|
||||||
|
|
||||||
[matrix_servers]
|
[matrix_servers]
|
||||||
matrix.example.com ansible_host=<your-server's external IP address> ansible_ssh_user=root
|
matrix.example.com ansible_host=<your-server's domain name or IP address> ansible_ssh_user=root
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
# This variable acknowledges that you've reviewed breaking changes up to this version.
|
||||||
|
# The playbook will fail if this is outdated, guiding you through what changed.
|
||||||
|
# See the changelog: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md
|
||||||
|
matrix_playbook_migration_validated_version: v2026.03.23.0
|
||||||
|
|
||||||
# The bare domain name which represents your Matrix identity.
|
# The bare domain name which represents your Matrix identity.
|
||||||
# Matrix user IDs for your server will be of the form (`@alice:example.com`).
|
# Matrix user IDs for your server will be of the form (`@alice:example.com`).
|
||||||
#
|
#
|
||||||
@@ -53,18 +58,10 @@ devture_systemd_docker_base_ipv6_enabled: true
|
|||||||
# The value used here must be shorter than 100 characters.
|
# The value used here must be shorter than 100 characters.
|
||||||
postgres_connection_password: ''
|
postgres_connection_password: ''
|
||||||
|
|
||||||
# By default, we configure coturn's external IP address using the value specified for `ansible_host` in your `inventory/hosts` file.
|
# You can limit heavy room joins on constrained hosts.
|
||||||
# If this value is an external IP address, you can skip this section.
|
# See:
|
||||||
|
# docs/configuring-playbook-synapse.md#limit-joining-heavy-rooms-on-constrained-hosts
|
||||||
#
|
#
|
||||||
# If `ansible_host` is not the server's external IP address, you have 2 choices:
|
# matrix_synapse_limit_remote_rooms_enabled: true
|
||||||
# 1. Uncomment the line below, to allow IP address auto-detection to happen (more on this below)
|
# matrix_synapse_limit_remote_rooms_complexity: 1.0
|
||||||
# 2. Uncomment and adjust the line below to specify an IP address manually
|
# matrix_synapse_limit_remote_rooms_admins_can_join: false
|
||||||
#
|
|
||||||
# By default, auto-detection will be attempted using the `https://ifconfig.co/json` API.
|
|
||||||
# Default values for this are specified in `coturn_turn_external_ip_address_auto_detection_*` variables in the coturn role
|
|
||||||
# (see `roles/galaxy/coturn/defaults/main.yml`).
|
|
||||||
#
|
|
||||||
# If your server has multiple IP addresses, you may define them in another variable which allows a list of addresses.
|
|
||||||
# Example: `coturn_turn_external_ip_addresses: ['1.2.3.4', '4.5.6.7']`
|
|
||||||
#
|
|
||||||
# coturn_turn_external_ip_address: ''
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
devShells.default = mkShell {
|
devShells.default = mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
just
|
just
|
||||||
|
mise
|
||||||
ansible
|
ansible
|
||||||
];
|
];
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
|||||||
alabaster==1.0.0
|
alabaster==1.0.0
|
||||||
babel==2.18.0
|
babel==2.18.0
|
||||||
certifi==2026.1.4
|
certifi==2026.2.25
|
||||||
charset-normalizer==3.4.4
|
charset-normalizer==3.4.6
|
||||||
click==8.3.1
|
click==8.3.1
|
||||||
docutils==0.22.4
|
docutils==0.22.4
|
||||||
idna==3.11
|
idna==3.11
|
||||||
imagesize==1.4.1
|
imagesize==2.0.0
|
||||||
Jinja2==3.1.6
|
Jinja2==3.1.6
|
||||||
linkify-it-py==2.0.3
|
linkify-it-py==2.1.0
|
||||||
markdown-it-py==4.0.0
|
markdown-it-py==4.0.0
|
||||||
MarkupSafe==3.0.3
|
MarkupSafe==3.0.3
|
||||||
mdit-py-plugins==0.5.0
|
mdit-py-plugins==0.5.0
|
||||||
@@ -17,17 +17,17 @@ packaging==26.0
|
|||||||
Pygments==2.19.2
|
Pygments==2.19.2
|
||||||
PyYAML==6.0.3
|
PyYAML==6.0.3
|
||||||
requests==2.32.5
|
requests==2.32.5
|
||||||
setuptools==82.0.0
|
setuptools==82.0.1
|
||||||
snowballstemmer==3.0.1
|
snowballstemmer==3.0.1
|
||||||
Sphinx==9.1.0
|
Sphinx==9.1.0
|
||||||
sphinx-intl==2.3.2
|
sphinx-intl==2.3.2
|
||||||
sphinx-markdown-builder==0.6.9
|
sphinx-markdown-builder==0.6.10
|
||||||
sphinxcontrib-applehelp==2.0.0
|
sphinxcontrib-applehelp==2.0.0
|
||||||
sphinxcontrib-devhelp==2.0.0
|
sphinxcontrib-devhelp==2.0.0
|
||||||
sphinxcontrib-htmlhelp==2.1.0
|
sphinxcontrib-htmlhelp==2.1.0
|
||||||
sphinxcontrib-jsmath==1.0.1
|
sphinxcontrib-jsmath==1.0.1
|
||||||
sphinxcontrib-qthelp==2.0.0
|
sphinxcontrib-qthelp==2.0.0
|
||||||
sphinxcontrib-serializinghtml==2.0.0
|
sphinxcontrib-serializinghtml==2.0.0
|
||||||
tabulate==0.9.0
|
tabulate==0.10.0
|
||||||
uc-micro-py==1.0.3
|
uc-micro-py==2.0.0
|
||||||
urllib3==2.6.3
|
urllib3==2.6.3
|
||||||
|
|||||||
50
justfile
50
justfile
@@ -4,6 +4,11 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
# mise (dev tool version manager)
|
||||||
|
mise_data_dir := env("MISE_DATA_DIR", justfile_directory() / "var/mise")
|
||||||
|
mise_trusted_config_paths := justfile_directory() / "mise.toml"
|
||||||
|
prek_home := env("PREK_HOME", justfile_directory() / "var/prek")
|
||||||
|
|
||||||
# Shows help
|
# Shows help
|
||||||
default:
|
default:
|
||||||
@{{ just_executable() }} --list --justfile "{{ justfile() }}"
|
@{{ just_executable() }} --list --justfile "{{ justfile() }}"
|
||||||
@@ -39,9 +44,39 @@ update-playbook-only:
|
|||||||
@git pull -q
|
@git pull -q
|
||||||
@-git stash pop -q
|
@-git stash pop -q
|
||||||
|
|
||||||
# Runs ansible-lint against all roles in the playbook
|
# Invokes mise with the project-local data directory
|
||||||
lint:
|
mise *args: _ensure_mise_data_directory
|
||||||
ansible-lint
|
#!/bin/sh
|
||||||
|
export MISE_DATA_DIR="{{ mise_data_dir }}"
|
||||||
|
export MISE_TRUSTED_CONFIG_PATHS="{{ mise_trusted_config_paths }}"
|
||||||
|
export MISE_YES=1
|
||||||
|
export PREK_HOME="{{ prek_home }}"
|
||||||
|
mise {{ args }}
|
||||||
|
|
||||||
|
# Runs prek (pre-commit hooks manager) with the given arguments
|
||||||
|
prek *args: _ensure_mise_tools_installed
|
||||||
|
@{{ just_executable() }} --justfile "{{ justfile() }}" mise exec -- prek {{ args }}
|
||||||
|
|
||||||
|
# Runs pre-commit hooks on staged files
|
||||||
|
prek-run-on-staged *args: _ensure_mise_tools_installed
|
||||||
|
@{{ just_executable() }} --justfile "{{ justfile() }}" prek run {{ args }}
|
||||||
|
|
||||||
|
# Runs pre-commit hooks on all files
|
||||||
|
prek-run-on-all *args: _ensure_mise_tools_installed
|
||||||
|
@{{ just_executable() }} --justfile "{{ justfile() }}" prek run --all-files {{ args }}
|
||||||
|
|
||||||
|
# Installs the git pre-commit hook
|
||||||
|
prek-install-git-pre-commit-hook: _ensure_mise_tools_installed
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
set -eu
|
||||||
|
{{ just_executable() }} --justfile "{{ justfile() }}" mise exec -- prek install
|
||||||
|
hook="{{ justfile_directory() }}/.git/hooks/pre-commit"
|
||||||
|
# The installed git hook runs later under Git, outside this just/mise environment.
|
||||||
|
# Injecting PREK_HOME keeps prek's cache under var/prek instead of a global home dir,
|
||||||
|
# which is more predictable and works better in sandboxed tools like Codex/OpenCode.
|
||||||
|
if [ -f "$hook" ] && ! grep -q '^export PREK_HOME=' "$hook"; then
|
||||||
|
sed -i '2iexport PREK_HOME="{{ prek_home }}"' "$hook"
|
||||||
|
fi
|
||||||
|
|
||||||
# Runs the playbook with --tags=install-all,ensure-matrix-users-created,start and optional arguments
|
# Runs the playbook with --tags=install-all,ensure-matrix-users-created,start and optional arguments
|
||||||
install-all *extra_args: (run-tags "install-all,ensure-matrix-users-created,start" extra_args)
|
install-all *extra_args: (run-tags "install-all,ensure-matrix-users-created,start" extra_args)
|
||||||
@@ -84,3 +119,12 @@ stop-group group *extra_args:
|
|||||||
# Rebuilds the mautrix-meta-instagram Ansible role using the mautrix-meta-messenger role as a source
|
# Rebuilds the mautrix-meta-instagram Ansible role using the mautrix-meta-messenger role as a source
|
||||||
rebuild-mautrix-meta-instagram:
|
rebuild-mautrix-meta-instagram:
|
||||||
/bin/bash "{{ justfile_directory() }}/bin/rebuild-mautrix-meta-instagram.sh" "{{ justfile_directory() }}/roles/custom"
|
/bin/bash "{{ justfile_directory() }}/bin/rebuild-mautrix-meta-instagram.sh" "{{ justfile_directory() }}/roles/custom"
|
||||||
|
|
||||||
|
# Internal - ensures var/mise and var/prek directories exist
|
||||||
|
_ensure_mise_data_directory:
|
||||||
|
@mkdir -p "{{ mise_data_dir }}"
|
||||||
|
@mkdir -p "{{ prek_home }}"
|
||||||
|
|
||||||
|
# Internal - ensures mise tools are installed
|
||||||
|
_ensure_mise_tools_installed: _ensure_mise_data_directory
|
||||||
|
@{{ just_executable() }} --justfile "{{ justfile() }}" mise install --quiet
|
||||||
|
|||||||
9
mise.toml
Normal file
9
mise.toml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# SPDX-FileCopyrightText: 2026 Slavi Pantaleev
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
[tools]
|
||||||
|
prek = "0.3.2"
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
yes = true
|
||||||
@@ -4,20 +4,20 @@
|
|||||||
version: v1.0.0-6
|
version: v1.0.0-6
|
||||||
name: auxiliary
|
name: auxiliary
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-backup_borg.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-backup_borg.git
|
||||||
version: v1.4.3-2.1.1-0
|
version: v1.4.3-2.1.3-2
|
||||||
name: backup_borg
|
name: backup_borg
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-cinny.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-cinny.git
|
||||||
version: v4.10.2-2
|
version: v4.11.1-1
|
||||||
name: cinny
|
name: cinny
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-container-socket-proxy.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-container-socket-proxy.git
|
||||||
version: v0.4.2-3
|
version: v0.4.2-4
|
||||||
name: container_socket_proxy
|
name: container_socket_proxy
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-coturn.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-coturn.git
|
||||||
version: v4.8.0-1
|
version: v4.9.0-1
|
||||||
name: coturn
|
name: coturn
|
||||||
activation_prefix: coturn_
|
activation_prefix: coturn_
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ddclient.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ddclient.git
|
||||||
version: v4.0.0-0
|
version: v4.0.0-2
|
||||||
name: ddclient
|
name: ddclient
|
||||||
activation_prefix: ddclient_
|
activation_prefix: ddclient_
|
||||||
- src: git+https://github.com/geerlingguy/ansible-role-docker
|
- src: git+https://github.com/geerlingguy/ansible-role-docker
|
||||||
@@ -27,25 +27,25 @@
|
|||||||
version: 542a2d68db4e9a8e9bb4b508052760b900c7dce6
|
version: 542a2d68db4e9a8e9bb4b508052760b900c7dce6
|
||||||
name: docker_sdk_for_python
|
name: docker_sdk_for_python
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-etherpad.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-etherpad.git
|
||||||
version: v2.6.1-0
|
version: v2.6.1-3
|
||||||
name: etherpad
|
name: etherpad
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-exim-relay.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-exim-relay.git
|
||||||
version: v4.98.1-r0-2-3
|
version: v4.99.1-r0-0-1
|
||||||
name: exim_relay
|
name: exim_relay
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-grafana.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-grafana.git
|
||||||
version: v11.6.5-6
|
version: v11.6.5-9
|
||||||
name: grafana
|
name: grafana
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-hydrogen.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-hydrogen.git
|
||||||
version: v0.5.1-0
|
version: v0.5.1-2
|
||||||
name: hydrogen
|
name: hydrogen
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-jitsi.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-jitsi.git
|
||||||
version: v10741-0
|
version: v10741-2
|
||||||
name: jitsi
|
name: jitsi
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server.git
|
||||||
version: v1.9.11-1
|
version: v1.9.12-1
|
||||||
name: livekit_server
|
name: livekit_server
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ntfy.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ntfy.git
|
||||||
version: v2.17.0-0
|
version: v2.19.2-1
|
||||||
name: ntfy
|
name: ntfy
|
||||||
- src: git+https://github.com/devture/com.devture.ansible.role.playbook_help.git
|
- src: git+https://github.com/devture/com.devture.ansible.role.playbook_help.git
|
||||||
version: 8630e4f1749bcb659c412820f754473f09055052
|
version: 8630e4f1749bcb659c412820f754473f09055052
|
||||||
@@ -57,35 +57,41 @@
|
|||||||
version: dd6e15246b7a9a2d921e0b3f9cd8a4a917a1bb2f
|
version: dd6e15246b7a9a2d921e0b3f9cd8a4a917a1bb2f
|
||||||
name: playbook_state_preserver
|
name: playbook_state_preserver
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-postgres.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-postgres.git
|
||||||
version: v18.2-1
|
version: v18.3-1
|
||||||
name: postgres
|
name: postgres
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup.git
|
||||||
version: v18-0
|
version: v18-2
|
||||||
name: postgres_backup
|
name: postgres_backup
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus.git
|
||||||
version: v3.9.1-0
|
version: v3.10.0-1
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-nginxlog-exporter.git
|
||||||
|
version: v1.10.0-2
|
||||||
|
name: prometheus_nginxlog_exporter
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-node-exporter.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-node-exporter.git
|
||||||
version: v1.9.1-13
|
version: v1.10.2-0
|
||||||
name: prometheus_node_exporter
|
name: prometheus_node_exporter
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-postgres-exporter.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-prometheus-postgres-exporter.git
|
||||||
version: v0.19.0-0
|
version: v0.19.1-3
|
||||||
name: prometheus_postgres_exporter
|
name: prometheus_postgres_exporter
|
||||||
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-sable.git
|
||||||
|
version: v1.6.0-2
|
||||||
|
name: sable
|
||||||
- src: git+https://github.com/devture/com.devture.ansible.role.systemd_docker_base.git
|
- src: git+https://github.com/devture/com.devture.ansible.role.systemd_docker_base.git
|
||||||
version: v1.4.1-0
|
version: v1.5.0-0
|
||||||
name: systemd_docker_base
|
name: systemd_docker_base
|
||||||
- src: git+https://github.com/devture/com.devture.ansible.role.systemd_service_manager.git
|
- src: git+https://github.com/devture/com.devture.ansible.role.systemd_service_manager.git
|
||||||
version: v3.0.0-1
|
version: v3.2.0-0
|
||||||
name: systemd_service_manager
|
name: systemd_service_manager
|
||||||
- src: git+https://github.com/devture/com.devture.ansible.role.timesync.git
|
- src: git+https://github.com/devture/com.devture.ansible.role.timesync.git
|
||||||
version: v1.1.0-1
|
version: v1.1.0-1
|
||||||
name: timesync
|
name: timesync
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik.git
|
||||||
version: v3.6.8-4
|
version: v3.6.11-2
|
||||||
name: traefik
|
name: traefik
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik-certs-dumper.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-traefik-certs-dumper.git
|
||||||
version: v2.10.0-5
|
version: v2.10.0-5
|
||||||
name: traefik_certs_dumper
|
name: traefik_certs_dumper
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-valkey.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-valkey.git
|
||||||
version: v9.0.2-0
|
version: v9.0.3-3
|
||||||
name: valkey
|
name: valkey
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
matrix_alertmanager_receiver_enabled: true
|
matrix_alertmanager_receiver_enabled: true
|
||||||
|
|
||||||
# renovate: datasource=docker depName=docker.io/metio/matrix-alertmanager-receiver
|
# renovate: datasource=docker depName=docker.io/metio/matrix-alertmanager-receiver
|
||||||
matrix_alertmanager_receiver_version: 2026.2.11
|
matrix_alertmanager_receiver_version: 2026.3.18
|
||||||
|
|
||||||
matrix_alertmanager_receiver_scheme: https
|
matrix_alertmanager_receiver_scheme: https
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_alertmanager_receiver_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_alertmanager_receiver_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_alertmanager_receiver_config_path }}/config.yml"
|
dest: "{{ matrix_alertmanager_receiver_config_path }}/config.yml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_alertmanager_receiver_config_result
|
register: matrix_alertmanager_receiver_config_result
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||||
dest: "{{ matrix_alertmanager_receiver_base_path }}/{{ item }}"
|
dest: "{{ matrix_alertmanager_receiver_base_path }}/{{ item }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-alertmanager-receiver.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-alertmanager-receiver.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-alertmanager-receiver.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-alertmanager-receiver.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_alertmanager_receiver_systemd_service_result
|
register: matrix_alertmanager_receiver_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether matrix-alertmanager-receiver needs a restart
|
- name: Determine whether matrix-alertmanager-receiver needs a restart
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -22,6 +22,6 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_double_puppet_registration_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_double_puppet_registration_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_double_puppet_config_path }}/registration.yaml"
|
dest: "{{ matrix_appservice_double_puppet_config_path }}/registration.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# SPDX-FileCopyrightText: 2024 MDAD project contributors
|
# SPDX-FileCopyrightText: 2024 MDAD project contributors
|
||||||
# SPDX-FileCopyrightText: 2024 - 2025 Catalan Lover <catalanlover@protonmail.com>
|
# SPDX-FileCopyrightText: 2024 - 2026 Catalan Lover <catalanlover@protonmail.com>
|
||||||
# SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
|
# SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
|
||||||
# SPDX-FileCopyrightText: 2024 Suguru Hirahara
|
# SPDX-FileCopyrightText: 2024 Suguru Hirahara
|
||||||
#
|
#
|
||||||
@@ -17,16 +17,17 @@ matrix_appservice_draupnir_for_all_version: "v2.9.0"
|
|||||||
matrix_appservice_draupnir_for_all_container_image_self_build: false
|
matrix_appservice_draupnir_for_all_container_image_self_build: false
|
||||||
matrix_appservice_draupnir_for_all_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
|
matrix_appservice_draupnir_for_all_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
|
||||||
|
|
||||||
matrix_appservice_draupnir_for_all_docker_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_draupnir_for_all_container_image_self_build else matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream }}"
|
matrix_appservice_draupnir_for_all_container_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_draupnir_for_all_container_image_self_build else matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream }}"
|
||||||
matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream: "{{ matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream_default }}"
|
matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream: "{{ matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream_default: "docker.io/"
|
matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream_default: "docker.io/"
|
||||||
matrix_appservice_draupnir_for_all_docker_image: "{{ matrix_appservice_draupnir_for_all_docker_image_registry_prefix }}gnuxie/draupnir:{{ matrix_appservice_draupnir_for_all_version }}"
|
matrix_appservice_draupnir_for_all_container_image: "{{ matrix_appservice_draupnir_for_all_container_image_registry_prefix }}{{ matrix_appservice_draupnir_for_all_container_image_registry_namespace_identifier }}:{{ matrix_appservice_draupnir_for_all_version }}"
|
||||||
matrix_appservice_draupnir_for_all_docker_image_force_pull: "{{ matrix_appservice_draupnir_for_all_docker_image.endswith(':latest') }}"
|
matrix_appservice_draupnir_for_all_container_image_registry_namespace_identifier: "gnuxie/draupnir"
|
||||||
|
matrix_appservice_draupnir_for_all_container_image_force_pull: "{{ matrix_appservice_draupnir_for_all_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_appservice_draupnir_for_all_base_path: "{{ matrix_base_data_path }}/draupnir-for-all"
|
matrix_appservice_draupnir_for_all_base_path: "{{ matrix_base_data_path }}/draupnir-for-all"
|
||||||
matrix_appservice_draupnir_for_all_config_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/config"
|
matrix_appservice_draupnir_for_all_config_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/config"
|
||||||
matrix_appservice_draupnir_for_all_data_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/data"
|
matrix_appservice_draupnir_for_all_data_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/data"
|
||||||
matrix_appservice_draupnir_for_all_docker_src_files_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/docker-src"
|
matrix_appservice_draupnir_for_all_container_src_files_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/docker-src"
|
||||||
|
|
||||||
matrix_appservice_draupnir_for_all_container_network: ""
|
matrix_appservice_draupnir_for_all_container_network: ""
|
||||||
|
|
||||||
|
|||||||
@@ -15,22 +15,22 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_appservice_draupnir_for_all_base_path }}", when: true}
|
- {path: "{{ matrix_appservice_draupnir_for_all_base_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_draupnir_for_all_config_path }}", when: true}
|
- {path: "{{ matrix_appservice_draupnir_for_all_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_draupnir_for_all_data_path }}", when: true}
|
- {path: "{{ matrix_appservice_draupnir_for_all_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}", when: "{{ matrix_appservice_draupnir_for_all_container_image_self_build }}"}
|
- {path: "{{ matrix_appservice_draupnir_for_all_container_src_files_path }}", when: "{{ matrix_appservice_draupnir_for_all_container_image_self_build }}"}
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
- name: Ensure Draupnir Docker image is pulled
|
- name: Ensure Draupnir Docker image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_draupnir_for_all_docker_image }}"
|
name: "{{ matrix_appservice_draupnir_for_all_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_appservice_draupnir_for_all_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_draupnir_for_all_container_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_appservice_draupnir_for_all_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_draupnir_for_all_container_image_force_pull }}"
|
||||||
when: "not matrix_appservice_draupnir_for_all_container_image_self_build | bool"
|
when: "not matrix_appservice_draupnir_for_all_container_image_self_build | bool"
|
||||||
register: matrix_appservice_draupnir_for_all_container_image_pull_result
|
register: matrix_appservice_draupnir_for_all_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -40,8 +40,8 @@
|
|||||||
- name: Ensure Draupnir repository is present on self-build
|
- name: Ensure Draupnir repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_appservice_draupnir_for_all_container_image_self_build_repo }}"
|
repo: "{{ matrix_appservice_draupnir_for_all_container_image_self_build_repo }}"
|
||||||
dest: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}"
|
dest: "{{ matrix_appservice_draupnir_for_all_container_src_files_path }}"
|
||||||
version: "{{ matrix_appservice_draupnir_for_all_docker_image.split(':')[1] }}"
|
version: "{{ matrix_appservice_draupnir_for_all_container_image.split(':')[1] }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -50,12 +50,12 @@
|
|||||||
|
|
||||||
- name: Ensure Draupnir Docker image is built
|
- name: Ensure Draupnir Docker image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_draupnir_for_all_docker_image }}"
|
name: "{{ matrix_appservice_draupnir_for_all_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_appservice_draupnir_for_all_git_pull_results.changed }}"
|
force_source: "{{ matrix_appservice_draupnir_for_all_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_appservice_draupnir_for_all_docker_src_files_path }}"
|
path: "{{ matrix_appservice_draupnir_for_all_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_appservice_draupnir_for_all_container_image_self_build | bool"
|
when: "matrix_appservice_draupnir_for_all_container_image_self_build | bool"
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_draupnir_for_all_configuration_appservice | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_draupnir_for_all_configuration_appservice | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_draupnir_for_all_config_path }}/production-appservice.yaml"
|
dest: "{{ matrix_appservice_draupnir_for_all_config_path }}/production-appservice.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_draupnir_for_all_appservice_config_result
|
register: matrix_appservice_draupnir_for_all_appservice_config_result
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_draupnir_for_all_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_draupnir_for_all_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_draupnir_for_all_config_path }}/production-bots.yaml"
|
dest: "{{ matrix_appservice_draupnir_for_all_config_path }}/production-bots.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_draupnir_for_all_bot_config_result
|
register: matrix_appservice_draupnir_for_all_bot_config_result
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_draupnir_for_all_registration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_draupnir_for_all_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_draupnir_for_all_config_path }}/draupnir-for-all-registration.yaml"
|
dest: "{{ matrix_appservice_draupnir_for_all_config_path }}/draupnir-for-all-registration.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_draupnir_for_all_registration_config_result
|
register: matrix_appservice_draupnir_for_all_registration_config_result
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-appservice-draupnir-for-all.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-appservice-draupnir-for-all.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-draupnir-for-all.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-draupnir-for-all.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_appservice_draupnir_for_all_systemd_service_result
|
register: matrix_appservice_draupnir_for_all_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Draupnir for All needs a restart
|
- name: Determine whether Draupnir for All needs a restart
|
||||||
|
|||||||
@@ -7,14 +7,6 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Fail if required matrix-bot-draupnir variables are undefined
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: "The `{{ item }}` variable must be defined and have a non-null value."
|
|
||||||
with_items:
|
|
||||||
- "matrix_appservice_draupnir_for_all_config_adminRoom"
|
|
||||||
- "matrix_bot_draupnir_container_network"
|
|
||||||
when: "lookup('vars', item, default='') == '' or lookup('vars', item, default='') is none"
|
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed matrix-appservice-draupnir-for-all settings
|
- name: (Deprecation) Catch and report renamed matrix-appservice-draupnir-for-all settings
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -22,6 +14,20 @@
|
|||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
with_items:
|
with_items:
|
||||||
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_name_prefix', 'new': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix'}
|
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_name_prefix', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix'}
|
||||||
- {'old': 'matrix_appservice_draupnir_for_all_enable_room_state_backing_store', 'new': 'matrix_appservice_draupnir_for_all_config_roomStateBackingStore_enabled'}
|
- {'old': 'matrix_appservice_draupnir_for_all_enable_room_state_backing_store', 'new': 'matrix_appservice_draupnir_for_all_config_roomStateBackingStore_enabled'}
|
||||||
- {'old': 'matrix_appservice_draupnir_for_all_master_control_room_alias', 'new': 'matrix_appservice_draupnir_for_all_config_adminRoom'}
|
- {'old': 'matrix_appservice_draupnir_for_all_master_control_room_alias', 'new': 'matrix_appservice_draupnir_for_all_config_adminRoom'}
|
||||||
|
- {'old': 'matrix_appservice_draupnir_for_all_docker_image', 'new': 'matrix_appservice_draupnir_for_all_container_image'}
|
||||||
|
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_force_pull', 'new': 'matrix_appservice_draupnir_for_all_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream_default', 'new': 'matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_appservice_draupnir_for_all_docker_src_files_path', 'new': 'matrix_appservice_draupnir_for_all_container_src_files_path'}
|
||||||
|
|
||||||
|
- name: Fail if required matrix-bot-draupnir variables are undefined
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "The `{{ item }}` variable must be defined and have a non-null value."
|
||||||
|
with_items:
|
||||||
|
- "matrix_appservice_draupnir_for_all_config_adminRoom"
|
||||||
|
- "matrix_bot_draupnir_container_network"
|
||||||
|
when: "lookup('vars', item, default='') == '' or lookup('vars', item, default='') is none"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% for arg in matrix_appservice_draupnir_for_all_container_extra_arguments %}
|
{% for arg in matrix_appservice_draupnir_for_all_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_appservice_draupnir_for_all_docker_image }} \
|
{{ matrix_appservice_draupnir_for_all_container_image }} \
|
||||||
appservice -c /data/config/production-appservice.yaml -f /data/config/draupnir-for-all-registration.yaml -p {{ matrix_appservice_draupnir_for_all_appservice_port }} --draupnir-config /data/config/production-bots.yaml
|
appservice -c /data/config/production-appservice.yaml -f /data/config/draupnir-for-all-registration.yaml -p {{ matrix_appservice_draupnir_for_all_appservice_port }} --draupnir-config /data/config/production-bots.yaml
|
||||||
|
|
||||||
{% for network in matrix_appservice_draupnir_for_all_container_additional_networks %}
|
{% for network in matrix_appservice_draupnir_for_all_container_additional_networks %}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ matrix_authentication_service_container_repo_version: "{{ 'main' if matrix_authe
|
|||||||
matrix_authentication_service_container_src_files_path: "{{ matrix_base_data_path }}/matrix-authentication-service/container-src"
|
matrix_authentication_service_container_src_files_path: "{{ matrix_base_data_path }}/matrix-authentication-service/container-src"
|
||||||
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/element-hq/matrix-authentication-service
|
# renovate: datasource=docker depName=ghcr.io/element-hq/matrix-authentication-service
|
||||||
matrix_authentication_service_version: 1.11.0
|
matrix_authentication_service_version: 1.13.0
|
||||||
matrix_authentication_service_container_image_registry_prefix: "{{ 'localhost/' if matrix_authentication_service_container_image_self_build else matrix_authentication_service_container_image_registry_prefix_upstream }}"
|
matrix_authentication_service_container_image_registry_prefix: "{{ 'localhost/' if matrix_authentication_service_container_image_self_build else matrix_authentication_service_container_image_registry_prefix_upstream }}"
|
||||||
matrix_authentication_service_container_image_registry_prefix_upstream: "{{ matrix_authentication_service_container_image_registry_prefix_upstream_default }}"
|
matrix_authentication_service_container_image_registry_prefix_upstream: "{{ matrix_authentication_service_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_authentication_service_container_image_registry_prefix_upstream_default: "ghcr.io/"
|
matrix_authentication_service_container_image_registry_prefix_upstream_default: "ghcr.io/"
|
||||||
@@ -300,6 +300,15 @@ matrix_authentication_service_config_database_idle_timeout: 600
|
|||||||
# Controls the `database.max_lifetime` configuration setting.
|
# Controls the `database.max_lifetime` configuration setting.
|
||||||
matrix_authentication_service_config_database_max_lifetime: 1800
|
matrix_authentication_service_config_database_max_lifetime: 1800
|
||||||
|
|
||||||
|
# Controls whether the database connection is made via a UNIX socket.
|
||||||
|
matrix_authentication_service_config_database_socket_enabled: false
|
||||||
|
|
||||||
|
# The path to the Postgres socket's parent directory inside the MAS container.
|
||||||
|
matrix_authentication_service_config_database_socket_path: "/run-postgres"
|
||||||
|
|
||||||
|
# The path to the Postgres socket directory on the host (bind-mount source).
|
||||||
|
matrix_authentication_service_config_database_socket_path_host: ""
|
||||||
|
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# #
|
# #
|
||||||
# /Database configuration #
|
# /Database configuration #
|
||||||
@@ -613,6 +622,10 @@ matrix_authentication_service_syn2mas_synapse_homeserver_config_path: ""
|
|||||||
|
|
||||||
matrix_authentication_service_syn2mas_container_network: "{{ matrix_authentication_service_container_network }}"
|
matrix_authentication_service_syn2mas_container_network: "{{ matrix_authentication_service_container_network }}"
|
||||||
|
|
||||||
|
matrix_authentication_service_syn2mas_synapse_database_socket_enabled: false
|
||||||
|
matrix_authentication_service_syn2mas_synapse_database_socket_path: ""
|
||||||
|
matrix_authentication_service_syn2mas_synapse_database_socket_path_host: ""
|
||||||
|
|
||||||
# Additional options passed to the syn2mas sub-command (e.g. `mas-cli syn2mas [OPTIONS] migrate|check`).
|
# Additional options passed to the syn2mas sub-command (e.g. `mas-cli syn2mas [OPTIONS] migrate|check`).
|
||||||
# Also see: `matrix_authentication_service_syn2mas_subcommand_extra_options`
|
# Also see: `matrix_authentication_service_syn2mas_subcommand_extra_options`
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -33,11 +33,30 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
loop_var: private_key_definition
|
loop_var: private_key_definition
|
||||||
|
|
||||||
|
# We intentionally do a single fixup pass here (instead of in `prepare_key.yml`)
|
||||||
|
# so that we reconcile both newly generated keys and any pre-existing keys with
|
||||||
|
# incorrect ownership/mode in one place.
|
||||||
|
#
|
||||||
|
# This primarily protects against setups where `become_user` is effectively not
|
||||||
|
# honored (for example due to inventory misconfiguration such as `ansible_become=false`),
|
||||||
|
# which can lead to host-side key generation creating root-owned files.
|
||||||
|
#
|
||||||
|
# See: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/5033
|
||||||
|
- name: Ensure Matrix Authentication Service private keys have correct ownership and mode
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ matrix_authentication_service_data_keys_path }}/{{ item.key_file }}"
|
||||||
|
state: file
|
||||||
|
mode: '0600'
|
||||||
|
owner: "{{ matrix_user_name }}"
|
||||||
|
group: "{{ matrix_group_name }}"
|
||||||
|
with_items: "{{ matrix_authentication_service_key_management_list }}"
|
||||||
|
register: matrix_authentication_service_private_keys_result
|
||||||
|
|
||||||
- name: Ensure Matrix Authentication Service configuration installed
|
- name: Ensure Matrix Authentication Service configuration installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_authentication_service_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_authentication_service_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_authentication_service_config_path }}/config.yaml"
|
dest: "{{ matrix_authentication_service_config_path }}/config.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_authentication_service_config_result
|
register: matrix_authentication_service_config_result
|
||||||
@@ -106,7 +125,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-authentication-service.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-authentication-service.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-authentication-service.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-authentication-service.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_authentication_service_systemd_service_result
|
register: matrix_authentication_service_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Matrix Authentication Service needs a restart
|
- name: Determine whether Matrix Authentication Service needs a restart
|
||||||
@@ -117,4 +136,5 @@
|
|||||||
or matrix_authentication_service_support_files_result.changed | default(false)
|
or matrix_authentication_service_support_files_result.changed | default(false)
|
||||||
or matrix_authentication_service_systemd_service_result.changed | default(false)
|
or matrix_authentication_service_systemd_service_result.changed | default(false)
|
||||||
or matrix_authentication_service_container_image_pull_result.changed | default(false)
|
or matrix_authentication_service_container_image_pull_result.changed | default(false)
|
||||||
|
or matrix_authentication_service_private_keys_result.changed | default(false)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -71,6 +71,12 @@
|
|||||||
--mount type=bind,src={{ matrix_authentication_service_config_path }}/config.yaml,dst=/config.yaml,ro
|
--mount type=bind,src={{ matrix_authentication_service_config_path }}/config.yaml,dst=/config.yaml,ro
|
||||||
--mount type=bind,src={{ matrix_authentication_service_data_keys_path }},dst=/keys,ro
|
--mount type=bind,src={{ matrix_authentication_service_data_keys_path }},dst=/keys,ro
|
||||||
--mount type=bind,src={{ matrix_authentication_service_syn2mas_synapse_homeserver_config_path }},dst=/homeserver.yaml,ro
|
--mount type=bind,src={{ matrix_authentication_service_syn2mas_synapse_homeserver_config_path }},dst=/homeserver.yaml,ro
|
||||||
|
{% if matrix_authentication_service_config_database_socket_enabled %}
|
||||||
|
--mount type=bind,src={{ matrix_authentication_service_config_database_socket_path_host }},dst={{ matrix_authentication_service_config_database_socket_path }}
|
||||||
|
{% endif %}
|
||||||
|
{% if matrix_authentication_service_syn2mas_synapse_database_socket_enabled and (not matrix_authentication_service_config_database_socket_enabled or matrix_authentication_service_syn2mas_synapse_database_socket_path != matrix_authentication_service_config_database_socket_path) %}
|
||||||
|
--mount type=bind,src={{ matrix_authentication_service_syn2mas_synapse_database_socket_path_host }},dst={{ matrix_authentication_service_syn2mas_synapse_database_socket_path }}
|
||||||
|
{% endif %}
|
||||||
{{ matrix_authentication_service_container_image }}
|
{{ matrix_authentication_service_container_image }}
|
||||||
syn2mas
|
syn2mas
|
||||||
--synapse-config=/homeserver.yaml
|
--synapse-config=/homeserver.yaml
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
- {'name': 'matrix_authentication_service_hostname', when: true}
|
- {'name': 'matrix_authentication_service_hostname', when: true}
|
||||||
- {'name': 'matrix_authentication_service_config_database_username', when: true}
|
- {'name': 'matrix_authentication_service_config_database_username', when: true}
|
||||||
- {'name': 'matrix_authentication_service_config_database_password', when: true}
|
- {'name': 'matrix_authentication_service_config_database_password', when: true}
|
||||||
- {'name': 'matrix_authentication_service_config_database_host', when: true}
|
- {'name': 'matrix_authentication_service_config_database_host', when: "{{ not matrix_authentication_service_config_database_socket_enabled }}"}
|
||||||
|
- {'name': 'matrix_authentication_service_config_database_socket_path_host', when: "{{ matrix_authentication_service_config_database_socket_enabled }}"}
|
||||||
- {'name': 'matrix_authentication_service_config_database_database', when: true}
|
- {'name': 'matrix_authentication_service_config_database_database', when: true}
|
||||||
- {'name': 'matrix_authentication_service_config_secrets_encryption', when: true}
|
- {'name': 'matrix_authentication_service_config_secrets_encryption', when: true}
|
||||||
- {'name': 'matrix_authentication_service_config_matrix_homeserver', when: true}
|
- {'name': 'matrix_authentication_service_config_matrix_homeserver', when: true}
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
--label-file={{ matrix_authentication_service_config_path }}/labels \
|
--label-file={{ matrix_authentication_service_config_path }}/labels \
|
||||||
--mount type=bind,src={{ matrix_authentication_service_config_path }}/config.yaml,dst=/config.yaml,ro \
|
--mount type=bind,src={{ matrix_authentication_service_config_path }}/config.yaml,dst=/config.yaml,ro \
|
||||||
--mount type=bind,src={{ matrix_authentication_service_data_keys_path }},dst=/keys,ro \
|
--mount type=bind,src={{ matrix_authentication_service_data_keys_path }},dst=/keys,ro \
|
||||||
|
{% if matrix_authentication_service_config_database_socket_enabled %}
|
||||||
|
--mount type=bind,src={{ matrix_authentication_service_config_database_socket_path_host }},dst={{ matrix_authentication_service_config_database_socket_path }} \
|
||||||
|
{% endif %}
|
||||||
{% for arg in matrix_authentication_service_container_extra_arguments %}
|
{% for arg in matrix_authentication_service_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -92,6 +92,10 @@ matrix_homeserver_enabled: true
|
|||||||
# Note that the homeserver implementation of a server will not be able to be changed without data loss.
|
# Note that the homeserver implementation of a server will not be able to be changed without data loss.
|
||||||
matrix_homeserver_implementation: synapse
|
matrix_homeserver_implementation: synapse
|
||||||
|
|
||||||
|
# The priority that the homeserver starts with (lower = starts earlier).
|
||||||
|
# Related to the systemd_service_manager role and `devture_systemd_service_manager_services_list*` variables.
|
||||||
|
matrix_homeserver_systemd_service_manager_priority: 1000
|
||||||
|
|
||||||
# This contains a secret, which is used for generating various other secrets later on.
|
# This contains a secret, which is used for generating various other secrets later on.
|
||||||
matrix_homeserver_generic_secret_key: ''
|
matrix_homeserver_generic_secret_key: ''
|
||||||
|
|
||||||
@@ -112,6 +116,9 @@ matrix_server_fqn_hydrogen: "hydrogen.{{ matrix_domain }}"
|
|||||||
# This is where you access the Cinny web client from (if enabled via cinny_enabled; disabled by default).
|
# This is where you access the Cinny web client from (if enabled via cinny_enabled; disabled by default).
|
||||||
matrix_server_fqn_cinny: "cinny.{{ matrix_domain }}"
|
matrix_server_fqn_cinny: "cinny.{{ matrix_domain }}"
|
||||||
|
|
||||||
|
# This is where you access the Sable web client from (if enabled via sable_enabled; disabled by default).
|
||||||
|
matrix_server_fqn_sable: "sable.{{ matrix_domain }}"
|
||||||
|
|
||||||
# This is where you access the SchildiChat Web from (if enabled via matrix_client_schildichat_enabled; disabled by default).
|
# This is where you access the SchildiChat Web from (if enabled via matrix_client_schildichat_enabled; disabled by default).
|
||||||
matrix_server_fqn_schildichat: "schildichat.{{ matrix_domain }}"
|
matrix_server_fqn_schildichat: "schildichat.{{ matrix_domain }}"
|
||||||
|
|
||||||
@@ -239,6 +246,21 @@ matrix_integration_manager_ui_url: ~
|
|||||||
matrix_homeserver_container_extra_arguments_auto: []
|
matrix_homeserver_container_extra_arguments_auto: []
|
||||||
matrix_homeserver_app_service_config_files_auto: []
|
matrix_homeserver_app_service_config_files_auto: []
|
||||||
|
|
||||||
|
# These playbook-level helpers describe which managed services Synapse should be wired to.
|
||||||
|
# They are meant for orchestration concerns like container networking and systemd ordering,
|
||||||
|
# while `matrix_synapse_*` variables stay focused on actual connection parameters.
|
||||||
|
# These likely get overridden elsewhere.
|
||||||
|
matrix_playbook_synapse_uses_managed_postgres: false
|
||||||
|
matrix_playbook_synapse_uses_managed_valkey: false
|
||||||
|
matrix_playbook_synapse_auto_compressor_uses_managed_postgres: false
|
||||||
|
|
||||||
|
# This playbook-level helper describes whether Matrix Authentication Service should be wired
|
||||||
|
# to the playbook-managed Postgres instance.
|
||||||
|
# It is meant for orchestration concerns like container networking, systemd ordering, and database creation,
|
||||||
|
# while `matrix_authentication_service_*` variables stay focused on actual connection parameters.
|
||||||
|
# This likely gets overridden elsewhere.
|
||||||
|
matrix_playbook_matrix_authentication_service_uses_managed_postgres: false
|
||||||
|
|
||||||
# Controls whether various services should expose metrics publicly.
|
# Controls whether various services should expose metrics publicly.
|
||||||
# If Prometheus is operating on the same machine, exposing metrics publicly is not necessary.
|
# If Prometheus is operating on the same machine, exposing metrics publicly is not necessary.
|
||||||
matrix_metrics_exposure_enabled: false
|
matrix_metrics_exposure_enabled: false
|
||||||
@@ -393,6 +415,22 @@ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_definition:
|
|||||||
host_bind_port: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_host_bind_port }}"
|
host_bind_port: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_host_bind_port }}"
|
||||||
config: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_config }}"
|
config: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_config }}"
|
||||||
|
|
||||||
|
# Controls whether to enable an additional Traefik entrypoint for LiveKit TURN/TLS (TCP) traffic.
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_enabled: false
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_name: matrix-livekit-turn
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_port: 5350
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_host_bind_port: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_port }}"
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_config: "{{ (matrix_playbook_livekit_turn_traefik_entrypoint_config_default | combine(matrix_playbook_livekit_turn_traefik_entrypoint_config_auto)) | combine(matrix_playbook_livekit_turn_traefik_entrypoint_config_custom, recursive=True) }}"
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_config_default: {}
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_config_auto: {}
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_config_custom: {}
|
||||||
|
|
||||||
|
matrix_playbook_livekit_turn_traefik_entrypoint_definition:
|
||||||
|
name: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_name }}"
|
||||||
|
port: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_port }}"
|
||||||
|
host_bind_port: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_host_bind_port }}"
|
||||||
|
config: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_config }}"
|
||||||
|
|
||||||
# Variables to Control which parts of our roles run.
|
# Variables to Control which parts of our roles run.
|
||||||
run_postgres_import: true
|
run_postgres_import: true
|
||||||
run_postgres_upgrade: true
|
run_postgres_upgrade: true
|
||||||
|
|||||||
@@ -27,4 +27,4 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/bin/remove-all.j2"
|
src: "{{ role_path }}/templates/bin/remove-all.j2"
|
||||||
dest: "{{ matrix_bin_path }}/remove-all"
|
dest: "{{ matrix_bin_path }}/remove-all"
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ matrix_bot_baibot_container_repo_version: "{{ 'main' if matrix_bot_baibot_versio
|
|||||||
matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"
|
matrix_bot_baibot_container_src_files_path: "{{ matrix_base_data_path }}/baibot/container-src"
|
||||||
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/etkecc/baibot
|
# renovate: datasource=docker depName=ghcr.io/etkecc/baibot
|
||||||
matrix_bot_baibot_version: v1.14.1
|
matrix_bot_baibot_version: v1.16.0
|
||||||
matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_registry_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
|
matrix_bot_baibot_container_image: "{{ matrix_bot_baibot_container_image_registry_prefix }}etkecc/baibot:{{ matrix_bot_baibot_version }}"
|
||||||
matrix_bot_baibot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else matrix_bot_baibot_container_image_registry_prefix_upstream }}"
|
matrix_bot_baibot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_baibot_container_image_self_build else matrix_bot_baibot_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"
|
matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"
|
||||||
@@ -59,8 +59,28 @@ matrix_bot_baibot_config_homeserver_url: ""
|
|||||||
# so it can start fresh.
|
# so it can start fresh.
|
||||||
matrix_bot_baibot_config_user_mxid_localpart: baibot
|
matrix_bot_baibot_config_user_mxid_localpart: baibot
|
||||||
|
|
||||||
|
# Authentication settings (`user.*` configuration keys).
|
||||||
|
#
|
||||||
|
# baibot supports 2 mutually-exclusive authentication modes.
|
||||||
|
# Set EITHER:
|
||||||
|
# - password authentication: `matrix_bot_baibot_config_user_password`
|
||||||
|
# OR:
|
||||||
|
# - access-token authentication: `matrix_bot_baibot_config_user_access_token` + `matrix_bot_baibot_config_user_device_id`
|
||||||
|
#
|
||||||
|
# Password authentication is recommended for most playbook-managed deployments,
|
||||||
|
# because it integrates with the `matrix-user-creator` role and can auto-create
|
||||||
|
# the bot account (via the `ensure-matrix-users-created` playbook tag).
|
||||||
|
# This remains true even on many MAS-enabled deployments where the bot account
|
||||||
|
# is local and playbook-managed.
|
||||||
|
|
||||||
# Controls the `user.password` configuration setting.
|
# Controls the `user.password` configuration setting.
|
||||||
matrix_bot_baibot_config_user_password: ''
|
matrix_bot_baibot_config_user_password: null
|
||||||
|
|
||||||
|
# Controls the `user.access_token` configuration setting.
|
||||||
|
matrix_bot_baibot_config_user_access_token: null
|
||||||
|
|
||||||
|
# Controls the `user.device_id` configuration setting.
|
||||||
|
matrix_bot_baibot_config_user_device_id: null
|
||||||
|
|
||||||
# Controls the `user.name` configuration setting.
|
# Controls the `user.name` configuration setting.
|
||||||
#
|
#
|
||||||
@@ -385,7 +405,7 @@ matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key: ""
|
|||||||
|
|
||||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_enabled: true
|
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_enabled: true
|
||||||
# For valid model choices, see: https://platform.openai.com/docs/models
|
# For valid model choices, see: https://platform.openai.com/docs/models
|
||||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_model_id: gpt-5.2
|
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_model_id: gpt-5.4
|
||||||
# The prompt text to use (can be null or empty to not use a prompt).
|
# The prompt text to use (can be null or empty to not use a prompt).
|
||||||
# See: https://huggingface.co/docs/transformers/en/tasks/prompting
|
# See: https://huggingface.co/docs/transformers/en/tasks/prompting
|
||||||
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
|
matrix_bot_baibot_config_agents_static_definitions_openai_config_text_generation_prompt: "{{ matrix_bot_baibot_config_agents_static_definitions_prompt }}"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_bot_baibot_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_bot_baibot_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_bot_baibot_config_path }}/config.yml"
|
dest: "{{ matrix_bot_baibot_config_path }}/config.yml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_bot_baibot_config_result
|
register: matrix_bot_baibot_config_result
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
dest: "{{ matrix_bot_baibot_config_path }}/env"
|
dest: "{{ matrix_bot_baibot_config_path }}/env"
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
register: matrix_bot_baibot_env_result
|
register: matrix_bot_baibot_env_result
|
||||||
|
|
||||||
- name: Ensure baibot container image is pulled
|
- name: Ensure baibot container image is pulled
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-baibot.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-baibot.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-baibot.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-baibot.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_baibot_systemd_service_result
|
register: matrix_bot_baibot_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether baibot needs a restart
|
- name: Determine whether baibot needs a restart
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
|
when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
|
||||||
with_items:
|
with_items:
|
||||||
- {'name': 'matrix_bot_baibot_config_user_mxid_localpart', when: true}
|
- {'name': 'matrix_bot_baibot_config_user_mxid_localpart', when: true}
|
||||||
- {'name': 'matrix_bot_baibot_config_user_password', when: true}
|
|
||||||
- {'name': 'matrix_bot_baibot_container_network', when: true}
|
- {'name': 'matrix_bot_baibot_container_network', when: true}
|
||||||
- {'name': 'matrix_bot_baibot_config_homeserver_url', when: true}
|
- {'name': 'matrix_bot_baibot_config_homeserver_url', when: true}
|
||||||
|
|
||||||
@@ -26,6 +25,58 @@
|
|||||||
|
|
||||||
- {'name': 'matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_openai_enabled }}"}
|
- {'name': 'matrix_bot_baibot_config_agents_static_definitions_openai_config_api_key', when: "{{ matrix_bot_baibot_config_agents_static_definitions_openai_enabled }}"}
|
||||||
|
|
||||||
|
- name: Fail if baibot authentication mode is not configured
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
You need to configure one baibot authentication mode:
|
||||||
|
either `matrix_bot_baibot_config_user_password`
|
||||||
|
or (`matrix_bot_baibot_config_user_access_token` + `matrix_bot_baibot_config_user_device_id`).
|
||||||
|
when: >-
|
||||||
|
(
|
||||||
|
matrix_bot_baibot_config_user_password | default('', true) | string | length == 0
|
||||||
|
)
|
||||||
|
and
|
||||||
|
(
|
||||||
|
matrix_bot_baibot_config_user_access_token | default('', true) | string | length == 0
|
||||||
|
and matrix_bot_baibot_config_user_device_id | default('', true) | string | length == 0
|
||||||
|
)
|
||||||
|
|
||||||
|
- name: Fail if baibot authentication mode is configured ambiguously
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
You need to configure exactly one baibot authentication mode.
|
||||||
|
Set either `matrix_bot_baibot_config_user_password`,
|
||||||
|
or (`matrix_bot_baibot_config_user_access_token` + `matrix_bot_baibot_config_user_device_id`) but not both.
|
||||||
|
when: >-
|
||||||
|
(
|
||||||
|
matrix_bot_baibot_config_user_password | default('', true) | string | length > 0
|
||||||
|
)
|
||||||
|
and
|
||||||
|
(
|
||||||
|
matrix_bot_baibot_config_user_access_token | default('', true) | string | length > 0
|
||||||
|
or matrix_bot_baibot_config_user_device_id | default('', true) | string | length > 0
|
||||||
|
)
|
||||||
|
|
||||||
|
- name: Fail if baibot access token authentication is incomplete
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
Access-token authentication requires both
|
||||||
|
`matrix_bot_baibot_config_user_access_token` and `matrix_bot_baibot_config_user_device_id`.
|
||||||
|
when: >-
|
||||||
|
(
|
||||||
|
matrix_bot_baibot_config_user_password | default('', true) | string | length == 0
|
||||||
|
)
|
||||||
|
and
|
||||||
|
(
|
||||||
|
matrix_bot_baibot_config_user_access_token | default('', true) | string | length > 0
|
||||||
|
or matrix_bot_baibot_config_user_device_id | default('', true) | string | length > 0
|
||||||
|
)
|
||||||
|
and
|
||||||
|
(
|
||||||
|
matrix_bot_baibot_config_user_access_token | default('', true) | string | length == 0
|
||||||
|
or matrix_bot_baibot_config_user_device_id | default('', true) | string | length == 0
|
||||||
|
)
|
||||||
|
|
||||||
- name: Fail if admin patterns list is empty
|
- name: Fail if admin patterns list is empty
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ homeserver:
|
|||||||
|
|
||||||
user:
|
user:
|
||||||
mxid_localpart: {{ matrix_bot_baibot_config_user_mxid_localpart | to_json }}
|
mxid_localpart: {{ matrix_bot_baibot_config_user_mxid_localpart | to_json }}
|
||||||
|
|
||||||
|
# Authentication: set EITHER password OR access_token + device_id.
|
||||||
password: {{ matrix_bot_baibot_config_user_password | to_json }}
|
password: {{ matrix_bot_baibot_config_user_password | to_json }}
|
||||||
|
access_token: {{ matrix_bot_baibot_config_user_access_token | to_json }}
|
||||||
|
device_id: {{ matrix_bot_baibot_config_user_device_id | to_json }}
|
||||||
|
|
||||||
# The name the bot uses as a display name and when it refers to itself.
|
# The name the bot uses as a display name and when it refers to itself.
|
||||||
# Leave empty to use the default (baibot).
|
# Leave empty to use the default (baibot).
|
||||||
|
|||||||
@@ -32,15 +32,15 @@ matrix_bot_buscarron_data_path: "{{ matrix_bot_buscarron_base_path }}/data"
|
|||||||
matrix_bot_buscarron_data_store_path: "{{ matrix_bot_buscarron_data_path }}/store"
|
matrix_bot_buscarron_data_store_path: "{{ matrix_bot_buscarron_data_path }}/store"
|
||||||
|
|
||||||
matrix_bot_buscarron_container_image_self_build: false
|
matrix_bot_buscarron_container_image_self_build: false
|
||||||
matrix_bot_buscarron_docker_repo: "https://github.com/etkecc/buscarron.git"
|
matrix_bot_buscarron_container_repo: "https://github.com/etkecc/buscarron.git"
|
||||||
matrix_bot_buscarron_docker_repo_version: "{{ matrix_bot_buscarron_version }}"
|
matrix_bot_buscarron_container_repo_version: "{{ matrix_bot_buscarron_version }}"
|
||||||
matrix_bot_buscarron_docker_src_files_path: "{{ matrix_base_data_path }}/buscarron/docker-src"
|
matrix_bot_buscarron_container_src_files_path: "{{ matrix_base_data_path }}/buscarron/docker-src"
|
||||||
|
|
||||||
matrix_bot_buscarron_docker_image: "{{ matrix_bot_buscarron_docker_image_registry_prefix }}etkecc/buscarron:{{ matrix_bot_buscarron_version }}"
|
matrix_bot_buscarron_container_image: "{{ matrix_bot_buscarron_container_image_registry_prefix }}etkecc/buscarron:{{ matrix_bot_buscarron_version }}"
|
||||||
matrix_bot_buscarron_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_buscarron_container_image_self_build else matrix_bot_buscarron_docker_image_registry_prefix_upstream }}"
|
matrix_bot_buscarron_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_buscarron_container_image_self_build else matrix_bot_buscarron_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_buscarron_docker_image_registry_prefix_upstream: "{{ matrix_bot_buscarron_docker_image_registry_prefix_upstream_default }}"
|
matrix_bot_buscarron_container_image_registry_prefix_upstream: "{{ matrix_bot_buscarron_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_bot_buscarron_docker_image_registry_prefix_upstream_default: "ghcr.io/"
|
matrix_bot_buscarron_container_image_registry_prefix_upstream_default: "ghcr.io/"
|
||||||
matrix_bot_buscarron_docker_image_force_pull: "{{ matrix_bot_buscarron_docker_image.endswith(':latest') }}"
|
matrix_bot_buscarron_container_image_force_pull: "{{ matrix_bot_buscarron_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
# The base container network. It will be auto-created by this role if it doesn't exist already.
|
# The base container network. It will be auto-created by this role if it doesn't exist already.
|
||||||
matrix_bot_buscarron_container_network: matrix-bot-buscarron
|
matrix_bot_buscarron_container_network: matrix-bot-buscarron
|
||||||
|
|||||||
@@ -38,14 +38,14 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_bot_buscarron_config_path }}", when: true}
|
- {path: "{{ matrix_bot_buscarron_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_buscarron_data_path }}", when: true}
|
- {path: "{{ matrix_bot_buscarron_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_buscarron_data_store_path }}", when: true}
|
- {path: "{{ matrix_bot_buscarron_data_store_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_buscarron_docker_src_files_path }}", when: true}
|
- {path: "{{ matrix_bot_buscarron_container_src_files_path }}", when: true}
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
- name: Ensure Buscarron support files installed
|
- name: Ensure Buscarron support files installed
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
dest: "{{ matrix_bot_buscarron_config_path }}/{{ item }}"
|
dest: "{{ matrix_bot_buscarron_config_path }}/{{ item }}"
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
with_items:
|
with_items:
|
||||||
- env
|
- env
|
||||||
- labels
|
- labels
|
||||||
@@ -62,10 +62,10 @@
|
|||||||
|
|
||||||
- name: Ensure Buscarron image is pulled
|
- name: Ensure Buscarron image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_buscarron_docker_image }}"
|
name: "{{ matrix_bot_buscarron_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_bot_buscarron_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_buscarron_container_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_buscarron_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_buscarron_container_image_force_pull }}"
|
||||||
when: "not matrix_bot_buscarron_container_image_self_build | bool"
|
when: "not matrix_bot_buscarron_container_image_self_build | bool"
|
||||||
register: matrix_bot_buscarron_container_image_pull_result
|
register: matrix_bot_buscarron_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -74,9 +74,9 @@
|
|||||||
|
|
||||||
- name: Ensure Buscarron repository is present on self-build
|
- name: Ensure Buscarron repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_bot_buscarron_docker_repo }}"
|
repo: "{{ matrix_bot_buscarron_container_repo }}"
|
||||||
version: "{{ matrix_bot_buscarron_docker_repo_version }}"
|
version: "{{ matrix_bot_buscarron_container_repo_version }}"
|
||||||
dest: "{{ matrix_bot_buscarron_docker_src_files_path }}"
|
dest: "{{ matrix_bot_buscarron_container_src_files_path }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -85,13 +85,13 @@
|
|||||||
|
|
||||||
- name: Ensure Buscarron image is built
|
- name: Ensure Buscarron image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_buscarron_docker_image }}"
|
name: "{{ matrix_bot_buscarron_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_buscarron_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_buscarron_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_buscarron_git_pull_results.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_buscarron_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_bot_buscarron_docker_src_files_path }}"
|
path: "{{ matrix_bot_buscarron_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_bot_buscarron_container_image_self_build | bool"
|
when: "matrix_bot_buscarron_container_image_self_build | bool"
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-buscarron.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-buscarron.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_buscarron_systemd_service_result
|
register: matrix_bot_buscarron_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Buscarron needs a restart
|
- name: Determine whether Buscarron needs a restart
|
||||||
|
|||||||
@@ -17,6 +17,14 @@
|
|||||||
- {'old': 'matrix_bot_buscarron_spam_emails', 'new': '<superseded by matrix_bot_buscarron_spamlist>'}
|
- {'old': 'matrix_bot_buscarron_spam_emails', 'new': '<superseded by matrix_bot_buscarron_spamlist>'}
|
||||||
- {'old': 'matrix_bot_buscarron_spam_localparts', 'new': '<superseded by matrix_bot_buscarron_spamlist>'}
|
- {'old': 'matrix_bot_buscarron_spam_localparts', 'new': '<superseded by matrix_bot_buscarron_spamlist>'}
|
||||||
- {'old': 'matrix_bot_buscarron_container_image_name_prefix', 'new': 'matrix_bot_buscarron_container_image_registry_prefix'}
|
- {'old': 'matrix_bot_buscarron_container_image_name_prefix', 'new': 'matrix_bot_buscarron_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_image', 'new': 'matrix_bot_buscarron_container_image'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_image_force_pull', 'new': 'matrix_bot_buscarron_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_image_registry_prefix', 'new': 'matrix_bot_buscarron_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_buscarron_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_buscarron_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_repo', 'new': 'matrix_bot_buscarron_container_repo'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_repo_version', 'new': 'matrix_bot_buscarron_container_repo_version'}
|
||||||
|
- {'old': 'matrix_bot_buscarron_docker_src_files_path', 'new': 'matrix_bot_buscarron_container_src_files_path'}
|
||||||
|
|
||||||
- name: Fail if required Buscarron settings not defined
|
- name: Fail if required Buscarron settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% for arg in matrix_bot_buscarron_container_extra_arguments %}
|
{% for arg in matrix_bot_buscarron_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_bot_buscarron_docker_image }}
|
{{ matrix_bot_buscarron_container_image }}
|
||||||
|
|
||||||
{% for network in matrix_bot_buscarron_container_additional_networks %}
|
{% for network in matrix_bot_buscarron_container_additional_networks %}
|
||||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-buscarron
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-buscarron
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# SPDX-FileCopyrightText: 2023 - 2024 MDAD project contributors
|
# SPDX-FileCopyrightText: 2023 - 2024 MDAD project contributors
|
||||||
# SPDX-FileCopyrightText: 2023 - 2025 Catalan Lover <catalanlover@protonmail.com>
|
# SPDX-FileCopyrightText: 2023 - 2026 Catalan Lover <catalanlover@protonmail.com>
|
||||||
# SPDX-FileCopyrightText: 2023 Samuel Meenzen
|
# SPDX-FileCopyrightText: 2023 Samuel Meenzen
|
||||||
# SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
|
# SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
|
||||||
#
|
#
|
||||||
@@ -17,16 +17,17 @@ matrix_bot_draupnir_version: "v2.9.0"
|
|||||||
matrix_bot_draupnir_container_image_self_build: false
|
matrix_bot_draupnir_container_image_self_build: false
|
||||||
matrix_bot_draupnir_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
|
matrix_bot_draupnir_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
|
||||||
|
|
||||||
matrix_bot_draupnir_docker_image: "{{ matrix_bot_draupnir_docker_image_registry_prefix }}gnuxie/draupnir:{{ matrix_bot_draupnir_version }}"
|
matrix_bot_draupnir_container_image: "{{ matrix_bot_draupnir_container_image_registry_prefix }}{{ matrix_bot_draupnir_container_image_registry_namespace_identifier }}:{{ matrix_bot_draupnir_version }}"
|
||||||
matrix_bot_draupnir_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_draupnir_container_image_self_build else matrix_bot_draupnir_docker_image_registry_prefix_upstream }}"
|
matrix_bot_draupnir_container_image_registry_namespace_identifier: "gnuxie/draupnir"
|
||||||
matrix_bot_draupnir_docker_image_registry_prefix_upstream: "{{ matrix_bot_draupnir_docker_image_registry_prefix_upstream_default }}"
|
matrix_bot_draupnir_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_draupnir_container_image_self_build else matrix_bot_draupnir_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_draupnir_docker_image_registry_prefix_upstream_default: "docker.io/"
|
matrix_bot_draupnir_container_image_registry_prefix_upstream: "{{ matrix_bot_draupnir_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_bot_draupnir_docker_image_force_pull: "{{ matrix_bot_draupnir_docker_image.endswith(':latest') }}"
|
matrix_bot_draupnir_container_image_registry_prefix_upstream_default: "docker.io/"
|
||||||
|
matrix_bot_draupnir_container_image_force_pull: "{{ matrix_bot_draupnir_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_bot_draupnir_base_path: "{{ matrix_base_data_path }}/draupnir"
|
matrix_bot_draupnir_base_path: "{{ matrix_base_data_path }}/draupnir"
|
||||||
matrix_bot_draupnir_config_path: "{{ matrix_bot_draupnir_base_path }}/config"
|
matrix_bot_draupnir_config_path: "{{ matrix_bot_draupnir_base_path }}/config"
|
||||||
matrix_bot_draupnir_data_path: "{{ matrix_bot_draupnir_base_path }}/data"
|
matrix_bot_draupnir_data_path: "{{ matrix_bot_draupnir_base_path }}/data"
|
||||||
matrix_bot_draupnir_docker_src_files_path: "{{ matrix_bot_draupnir_base_path }}/docker-src"
|
matrix_bot_draupnir_container_src_files_path: "{{ matrix_bot_draupnir_base_path }}/docker-src"
|
||||||
|
|
||||||
matrix_bot_draupnir_config_web_enabled: "{{ matrix_bot_draupnir_config_web_abuseReporting or matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled }}" # noqa var-naming
|
matrix_bot_draupnir_config_web_enabled: "{{ matrix_bot_draupnir_config_web_abuseReporting or matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled }}" # noqa var-naming
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_bot_draupnir_base_path }}", when: true}
|
- {path: "{{ matrix_bot_draupnir_base_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_draupnir_config_path }}", when: true}
|
- {path: "{{ matrix_bot_draupnir_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_draupnir_data_path }}", when: true}
|
- {path: "{{ matrix_bot_draupnir_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_draupnir_docker_src_files_path }}", when: "{{ matrix_bot_draupnir_container_image_self_build }}"}
|
- {path: "{{ matrix_bot_draupnir_container_src_files_path }}", when: "{{ matrix_bot_draupnir_container_image_self_build }}"}
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
- name: Ensure matrix-bot-draupnir support files installed
|
- name: Ensure matrix-bot-draupnir support files installed
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
with_items:
|
with_items:
|
||||||
- src: "{{ role_path }}/templates/labels.j2"
|
- src: "{{ role_path }}/templates/labels.j2"
|
||||||
dest: "{{ matrix_bot_draupnir_base_path }}/labels"
|
dest: "{{ matrix_bot_draupnir_base_path }}/labels"
|
||||||
@@ -39,10 +39,10 @@
|
|||||||
|
|
||||||
- name: Ensure Draupnir Docker image is pulled
|
- name: Ensure Draupnir Docker image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_draupnir_docker_image }}"
|
name: "{{ matrix_bot_draupnir_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_bot_draupnir_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_draupnir_container_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_draupnir_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_draupnir_container_image_force_pull }}"
|
||||||
when: "not matrix_bot_draupnir_container_image_self_build | bool"
|
when: "not matrix_bot_draupnir_container_image_self_build | bool"
|
||||||
register: matrix_bot_draupnir_container_image_pull_result
|
register: matrix_bot_draupnir_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -52,8 +52,8 @@
|
|||||||
- name: Ensure Draupnir repository is present on self-build
|
- name: Ensure Draupnir repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_bot_draupnir_container_image_self_build_repo }}"
|
repo: "{{ matrix_bot_draupnir_container_image_self_build_repo }}"
|
||||||
dest: "{{ matrix_bot_draupnir_docker_src_files_path }}"
|
dest: "{{ matrix_bot_draupnir_container_src_files_path }}"
|
||||||
version: "{{ matrix_bot_draupnir_docker_image.split(':')[1] }}"
|
version: "{{ matrix_bot_draupnir_container_image.split(':')[1] }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -62,12 +62,12 @@
|
|||||||
|
|
||||||
- name: Ensure Draupnir Docker image is built
|
- name: Ensure Draupnir Docker image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_draupnir_docker_image }}"
|
name: "{{ matrix_bot_draupnir_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_draupnir_git_pull_results.changed }}"
|
force_source: "{{ matrix_bot_draupnir_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_bot_draupnir_docker_src_files_path }}"
|
path: "{{ matrix_bot_draupnir_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_bot_draupnir_container_image_self_build | bool"
|
when: "matrix_bot_draupnir_container_image_self_build | bool"
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_bot_draupnir_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_bot_draupnir_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_bot_draupnir_config_path }}/production.yaml"
|
dest: "{{ matrix_bot_draupnir_config_path }}/production.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_bot_draupnir_config_result
|
register: matrix_bot_draupnir_config_result
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-draupnir.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-draupnir.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-draupnir.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-draupnir.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_draupnir_systemd_service_result
|
register: matrix_bot_draupnir_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Draupnir needs a restart
|
- name: Determine whether Draupnir needs a restart
|
||||||
|
|||||||
@@ -31,6 +31,12 @@
|
|||||||
- {'old': 'matrix_bot_draupnir_container_labels_traefik_entrypoints', 'new': 'matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints'}
|
- {'old': 'matrix_bot_draupnir_container_labels_traefik_entrypoints', 'new': 'matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints'}
|
||||||
- {'old': 'matrix_bot_draupnir_container_labels_traefik_tls', 'new': 'matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls'}
|
- {'old': 'matrix_bot_draupnir_container_labels_traefik_tls', 'new': 'matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls'}
|
||||||
- {'old': 'matrix_bot_draupnir_container_labels_traefik_tls_certResolver', 'new': 'matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver'}
|
- {'old': 'matrix_bot_draupnir_container_labels_traefik_tls_certResolver', 'new': 'matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver'}
|
||||||
|
- {'old': 'matrix_bot_draupnir_docker_image', 'new': 'matrix_bot_draupnir_container_image'}
|
||||||
|
- {'old': 'matrix_bot_draupnir_docker_image_force_pull', 'new': 'matrix_bot_draupnir_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_bot_draupnir_docker_image_registry_prefix', 'new': 'matrix_bot_draupnir_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_draupnir_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_draupnir_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_bot_draupnir_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_draupnir_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_bot_draupnir_docker_src_files_path', 'new': 'matrix_bot_draupnir_container_src_files_path'}
|
||||||
|
|
||||||
- name: Fail if required matrix-bot-draupnir variables are undefined
|
- name: Fail if required matrix-bot-draupnir variables are undefined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% for arg in matrix_bot_draupnir_container_extra_arguments %}
|
{% for arg in matrix_bot_draupnir_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_bot_draupnir_docker_image }} \
|
{{ matrix_bot_draupnir_container_image }} \
|
||||||
bot --draupnir-config /data/config/production.yaml
|
bot --draupnir-config /data/config/production.yaml
|
||||||
|
|
||||||
{% for network in matrix_bot_draupnir_container_additional_networks %}
|
{% for network in matrix_bot_draupnir_container_additional_networks %}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_bot_go_neb_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_bot_go_neb_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_bot_go_neb_config_path }}/config.yaml"
|
dest: "{{ matrix_bot_go_neb_config_path }}/config.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_bot_go_neb_config_result
|
register: matrix_bot_go_neb_config_result
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||||
dest: "{{ matrix_bot_go_neb_base_path }}/{{ item }}"
|
dest: "{{ matrix_bot_go_neb_base_path }}/{{ item }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-go-neb.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-go-neb.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_go_neb_systemd_service_result
|
register: matrix_bot_go_neb_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether go-neb needs a restart
|
- name: Determine whether go-neb needs a restart
|
||||||
|
|||||||
@@ -25,17 +25,17 @@ matrix_bot_honoroit_path_prefix: /
|
|||||||
matrix_bot_honoroit_metrics_path: /metrics
|
matrix_bot_honoroit_metrics_path: /metrics
|
||||||
|
|
||||||
matrix_bot_honoroit_container_image_self_build: false
|
matrix_bot_honoroit_container_image_self_build: false
|
||||||
matrix_bot_honoroit_docker_repo: "https://github.com/etkecc/honoroit.git"
|
matrix_bot_honoroit_container_repo: "https://github.com/etkecc/honoroit.git"
|
||||||
matrix_bot_honoroit_docker_repo_version: "{{ matrix_bot_honoroit_version }}"
|
matrix_bot_honoroit_container_repo_version: "{{ matrix_bot_honoroit_version }}"
|
||||||
matrix_bot_honoroit_docker_src_files_path: "{{ matrix_base_data_path }}/honoroit/docker-src"
|
matrix_bot_honoroit_container_src_files_path: "{{ matrix_base_data_path }}/honoroit/docker-src"
|
||||||
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/etkecc/honoroit
|
# renovate: datasource=docker depName=ghcr.io/etkecc/honoroit
|
||||||
matrix_bot_honoroit_version: v0.9.29
|
matrix_bot_honoroit_version: v0.9.30
|
||||||
matrix_bot_honoroit_docker_image: "{{ matrix_bot_honoroit_docker_image_registry_prefix }}etkecc/honoroit:{{ matrix_bot_honoroit_version }}"
|
matrix_bot_honoroit_container_image: "{{ matrix_bot_honoroit_container_image_registry_prefix }}etkecc/honoroit:{{ matrix_bot_honoroit_version }}"
|
||||||
matrix_bot_honoroit_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_honoroit_container_image_self_build else matrix_bot_honoroit_docker_image_registry_prefix_upstream }}"
|
matrix_bot_honoroit_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_honoroit_container_image_self_build else matrix_bot_honoroit_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_honoroit_docker_image_registry_prefix_upstream: "{{ matrix_bot_honoroit_docker_image_registry_prefix_upstream_default }}"
|
matrix_bot_honoroit_container_image_registry_prefix_upstream: "{{ matrix_bot_honoroit_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_bot_honoroit_docker_image_registry_prefix_upstream_default: "ghcr.io/"
|
matrix_bot_honoroit_container_image_registry_prefix_upstream_default: "ghcr.io/"
|
||||||
matrix_bot_honoroit_docker_image_force_pull: "{{ matrix_bot_honoroit_docker_image.endswith(':latest') }}"
|
matrix_bot_honoroit_container_image_force_pull: "{{ matrix_bot_honoroit_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_bot_honoroit_base_path: "{{ matrix_base_data_path }}/honoroit"
|
matrix_bot_honoroit_base_path: "{{ matrix_base_data_path }}/honoroit"
|
||||||
matrix_bot_honoroit_config_path: "{{ matrix_bot_honoroit_base_path }}/config"
|
matrix_bot_honoroit_config_path: "{{ matrix_bot_honoroit_base_path }}/config"
|
||||||
|
|||||||
@@ -40,14 +40,14 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_bot_honoroit_config_path }}", when: true}
|
- {path: "{{ matrix_bot_honoroit_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_honoroit_data_path }}", when: true}
|
- {path: "{{ matrix_bot_honoroit_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_honoroit_data_store_path }}", when: true}
|
- {path: "{{ matrix_bot_honoroit_data_store_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_honoroit_docker_src_files_path }}", when: true}
|
- {path: "{{ matrix_bot_honoroit_container_src_files_path }}", when: true}
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
- name: Ensure Honoroit support files installed
|
- name: Ensure Honoroit support files installed
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
dest: "{{ matrix_bot_honoroit_config_path }}/{{ item }}"
|
dest: "{{ matrix_bot_honoroit_config_path }}/{{ item }}"
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
with_items:
|
with_items:
|
||||||
- env
|
- env
|
||||||
- labels
|
- labels
|
||||||
@@ -64,10 +64,10 @@
|
|||||||
|
|
||||||
- name: Ensure Honoroit image is pulled
|
- name: Ensure Honoroit image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_honoroit_docker_image }}"
|
name: "{{ matrix_bot_honoroit_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_bot_honoroit_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_honoroit_container_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_honoroit_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_honoroit_container_image_force_pull }}"
|
||||||
when: "not matrix_bot_honoroit_container_image_self_build | bool"
|
when: "not matrix_bot_honoroit_container_image_self_build | bool"
|
||||||
register: matrix_bot_honoroit_container_image_pull_result
|
register: matrix_bot_honoroit_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -76,9 +76,9 @@
|
|||||||
|
|
||||||
- name: Ensure Honoroit repository is present on self-build
|
- name: Ensure Honoroit repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_bot_honoroit_docker_repo }}"
|
repo: "{{ matrix_bot_honoroit_container_repo }}"
|
||||||
version: "{{ matrix_bot_honoroit_docker_repo_version }}"
|
version: "{{ matrix_bot_honoroit_container_repo_version }}"
|
||||||
dest: "{{ matrix_bot_honoroit_docker_src_files_path }}"
|
dest: "{{ matrix_bot_honoroit_container_src_files_path }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -87,13 +87,13 @@
|
|||||||
|
|
||||||
- name: Ensure Honoroit image is built
|
- name: Ensure Honoroit image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_honoroit_docker_image }}"
|
name: "{{ matrix_bot_honoroit_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_honoroit_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_honoroit_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_honoroit_container_image_self_build.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_honoroit_container_image_self_build.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_bot_honoroit_docker_src_files_path }}"
|
path: "{{ matrix_bot_honoroit_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_bot_honoroit_container_image_self_build | bool"
|
when: "matrix_bot_honoroit_container_image_self_build | bool"
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-honoroit.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-honoroit.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_honoroit_systemd_service_result
|
register: matrix_bot_honoroit_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Honoroit needs a restart
|
- name: Determine whether Honoroit needs a restart
|
||||||
|
|||||||
@@ -6,6 +6,23 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: (Deprecation) Catch and report renamed Honoroit settings
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
Your configuration contains a variable, which now has a different name.
|
||||||
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
|
with_items:
|
||||||
|
- {'old': 'matrix_bot_honoroit_container_image_name_prefix', 'new': 'matrix_bot_honoroit_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_image', 'new': 'matrix_bot_honoroit_container_image'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_image_force_pull', 'new': 'matrix_bot_honoroit_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_image_registry_prefix', 'new': 'matrix_bot_honoroit_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_honoroit_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_honoroit_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_repo', 'new': 'matrix_bot_honoroit_container_repo'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_repo_version', 'new': 'matrix_bot_honoroit_container_repo_version'}
|
||||||
|
- {'old': 'matrix_bot_honoroit_docker_src_files_path', 'new': 'matrix_bot_honoroit_container_src_files_path'}
|
||||||
|
|
||||||
- name: Fail if required Honoroit settings not defined
|
- name: Fail if required Honoroit settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -16,12 +33,3 @@
|
|||||||
- {'name': 'matrix_bot_honoroit_password', when: true}
|
- {'name': 'matrix_bot_honoroit_password', when: true}
|
||||||
- {'name': 'matrix_bot_honoroit_roomid', when: true}
|
- {'name': 'matrix_bot_honoroit_roomid', when: true}
|
||||||
- {'name': 'matrix_bot_honoroit_database_hostname', when: "{{ matrix_bot_honoroit_database_engine == 'postgres' }}"}
|
- {'name': 'matrix_bot_honoroit_database_hostname', when: "{{ matrix_bot_honoroit_database_engine == 'postgres' }}"}
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed Honoroit settings
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-
|
|
||||||
Your configuration contains a variable, which now has a different name.
|
|
||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
|
||||||
with_items:
|
|
||||||
- {'old': 'matrix_bot_honoroit_container_image_name_prefix', 'new': 'matrix_bot_honoroit_container_image_registry_prefix'}
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% for arg in matrix_bot_honoroit_container_extra_arguments %}
|
{% for arg in matrix_bot_honoroit_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_bot_honoroit_docker_image }}
|
{{ matrix_bot_honoroit_container_image }}
|
||||||
|
|
||||||
{% for network in matrix_bot_honoroit_container_additional_networks %}
|
{% for network in matrix_bot_honoroit_container_additional_networks %}
|
||||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-honoroit
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-honoroit
|
||||||
|
|||||||
@@ -14,19 +14,19 @@
|
|||||||
|
|
||||||
matrix_bot_matrix_registration_bot_enabled: true
|
matrix_bot_matrix_registration_bot_enabled: true
|
||||||
matrix_bot_matrix_registration_bot_container_image_self_build: false
|
matrix_bot_matrix_registration_bot_container_image_self_build: false
|
||||||
matrix_bot_matrix_registration_bot_docker_repo: "https://github.com/moan0s/matrix-registration-bot.git"
|
matrix_bot_matrix_registration_bot_container_repo: "https://github.com/moan0s/matrix-registration-bot.git"
|
||||||
matrix_bot_matrix_registration_bot_docker_repo_version: "{{ 'main' if matrix_bot_matrix_registration_bot_version == 'latest' else ('v' + matrix_bot_matrix_registration_bot_version) }}"
|
matrix_bot_matrix_registration_bot_container_repo_version: "{{ 'main' if matrix_bot_matrix_registration_bot_version == 'latest' else ('v' + matrix_bot_matrix_registration_bot_version) }}"
|
||||||
matrix_bot_matrix_registration_bot_docker_src_files_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/docker-src"
|
matrix_bot_matrix_registration_bot_container_src_files_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/docker-src"
|
||||||
|
|
||||||
# renovate: datasource=docker depName=moanos/matrix-registration-bot
|
# renovate: datasource=docker depName=moanos/matrix-registration-bot
|
||||||
matrix_bot_matrix_registration_bot_version: 1.3.0
|
matrix_bot_matrix_registration_bot_version: 1.3.0
|
||||||
matrix_bot_matrix_registration_bot_docker_iteration: 0
|
matrix_bot_matrix_registration_bot_container_iteration: 0
|
||||||
matrix_bot_matrix_registration_bot_docker_tag: "{{ matrix_bot_matrix_registration_bot_version }}-{{ matrix_bot_matrix_registration_bot_docker_iteration }}"
|
matrix_bot_matrix_registration_bot_container_tag: "{{ matrix_bot_matrix_registration_bot_version }}-{{ matrix_bot_matrix_registration_bot_container_iteration }}"
|
||||||
matrix_bot_matrix_registration_bot_docker_image: "{{ matrix_bot_matrix_registration_bot_docker_image_registry_prefix }}moanos/matrix-registration-bot:{{ matrix_bot_matrix_registration_bot_docker_tag }}"
|
matrix_bot_matrix_registration_bot_container_image: "{{ matrix_bot_matrix_registration_bot_container_image_registry_prefix }}moanos/matrix-registration-bot:{{ matrix_bot_matrix_registration_bot_container_tag }}"
|
||||||
matrix_bot_matrix_registration_bot_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_matrix_registration_bot_container_image_self_build else matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream }}"
|
matrix_bot_matrix_registration_bot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_matrix_registration_bot_container_image_self_build else matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream: "{{ matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default }}"
|
matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream: "{{ matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default: "docker.io/"
|
matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default: "docker.io/"
|
||||||
matrix_bot_matrix_registration_bot_docker_image_force_pull: "{{ matrix_bot_matrix_registration_bot_docker_image.endswith(':latest') }}"
|
matrix_bot_matrix_registration_bot_container_image_force_pull: "{{ matrix_bot_matrix_registration_bot_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_bot_matrix_registration_bot_base_path: "{{ matrix_base_data_path }}/matrix-registration-bot"
|
matrix_bot_matrix_registration_bot_base_path: "{{ matrix_base_data_path }}/matrix-registration-bot"
|
||||||
matrix_bot_matrix_registration_bot_config_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/config"
|
matrix_bot_matrix_registration_bot_config_path: "{{ matrix_bot_matrix_registration_bot_base_path }}/config"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
state: "{{ item }}"
|
state: "{{ item }}"
|
||||||
path: "{{ matrix_bot_matrix_registration_bot_data_path }}"
|
path: "{{ matrix_bot_matrix_registration_bot_data_path }}"
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
|||||||
@@ -12,13 +12,13 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true}
|
- {path: "{{ matrix_bot_matrix_registration_bot_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true}
|
- {path: "{{ matrix_bot_matrix_registration_bot_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}", when: "{{ matrix_bot_matrix_registration_bot_container_image_self_build }}"}
|
- {path: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}", when: "{{ matrix_bot_matrix_registration_bot_container_image_self_build }}"}
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
- name: Ensure matrix-registration-bot configuration file created
|
- name: Ensure matrix-registration-bot configuration file created
|
||||||
@@ -27,15 +27,15 @@
|
|||||||
dest: "{{ matrix_bot_matrix_registration_bot_config_path }}/config.yaml"
|
dest: "{{ matrix_bot_matrix_registration_bot_config_path }}/config.yaml"
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
register: matrix_bot_matrix_registration_bot_config_result
|
register: matrix_bot_matrix_registration_bot_config_result
|
||||||
|
|
||||||
- name: Ensure matrix-registration-bot image is pulled
|
- name: Ensure matrix-registration-bot image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_matrix_registration_bot_docker_image }}"
|
name: "{{ matrix_bot_matrix_registration_bot_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_bot_matrix_registration_bot_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_matrix_registration_bot_container_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_matrix_registration_bot_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_registration_bot_container_image_force_pull }}"
|
||||||
when: "not matrix_bot_matrix_registration_bot_container_image_self_build | bool"
|
when: "not matrix_bot_matrix_registration_bot_container_image_self_build | bool"
|
||||||
register: matrix_bot_matrix_registration_bot_container_image_pull_result
|
register: matrix_bot_matrix_registration_bot_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -46,9 +46,9 @@
|
|||||||
block:
|
block:
|
||||||
- name: Ensure matrix-registration-bot repository is present on self-build
|
- name: Ensure matrix-registration-bot repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_bot_matrix_registration_bot_docker_repo }}"
|
repo: "{{ matrix_bot_matrix_registration_bot_container_repo }}"
|
||||||
version: "{{ matrix_bot_matrix_registration_bot_docker_repo_version }}"
|
version: "{{ matrix_bot_matrix_registration_bot_container_repo_version }}"
|
||||||
dest: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
|
dest: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -56,13 +56,13 @@
|
|||||||
|
|
||||||
- name: Ensure matrix-registration-bot image is built
|
- name: Ensure matrix-registration-bot image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_matrix_registration_bot_docker_image }}"
|
name: "{{ matrix_bot_matrix_registration_bot_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_matrix_registration_bot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_matrix_registration_bot_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_matrix_registration_bot_git_pull_results.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_registration_bot_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_bot_matrix_registration_bot_docker_src_files_path }}"
|
path: "{{ matrix_bot_matrix_registration_bot_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
|
|
||||||
- name: Ensure matrix-registration-bot container network is created
|
- name: Ensure matrix-registration-bot container network is created
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_matrix_registration_bot_systemd_service_result
|
register: matrix_bot_matrix_registration_bot_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether matrix-registration-bot needs a restart
|
- name: Determine whether matrix-registration-bot needs a restart
|
||||||
|
|||||||
@@ -6,15 +6,6 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Fail if required settings not defined
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-
|
|
||||||
You need to define a required configuration setting (`{{ item }}`).
|
|
||||||
when: "lookup('vars', item, default='') == ''"
|
|
||||||
with_items:
|
|
||||||
- "matrix_bot_matrix_registration_bot_bot_password"
|
|
||||||
- "matrix_bot_matrix_registration_bot_api_base_url"
|
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed settings
|
- name: (Deprecation) Catch and report renamed settings
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -24,3 +15,22 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- {'old': 'matrix_bot_matrix_registration_bot_bot_access_token', 'new': '<removed>'}
|
- {'old': 'matrix_bot_matrix_registration_bot_bot_access_token', 'new': '<removed>'}
|
||||||
- {'old': 'matrix_bot_matrix_registration_bot_matrix_homeserver_url', 'new': 'matrix_bot_matrix_registration_bot_api_base_url'}
|
- {'old': 'matrix_bot_matrix_registration_bot_matrix_homeserver_url', 'new': 'matrix_bot_matrix_registration_bot_api_base_url'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_image', 'new': 'matrix_bot_matrix_registration_bot_container_image'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_image_force_pull', 'new': 'matrix_bot_matrix_registration_bot_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_matrix_registration_bot_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_iteration', 'new': 'matrix_bot_matrix_registration_bot_container_iteration'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_repo', 'new': 'matrix_bot_matrix_registration_bot_container_repo'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_repo_version', 'new': 'matrix_bot_matrix_registration_bot_container_repo_version'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_src_files_path', 'new': 'matrix_bot_matrix_registration_bot_container_src_files_path'}
|
||||||
|
- {'old': 'matrix_bot_matrix_registration_bot_docker_tag', 'new': 'matrix_bot_matrix_registration_bot_container_tag'}
|
||||||
|
|
||||||
|
- name: Fail if required settings not defined
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
You need to define a required configuration setting (`{{ item }}`).
|
||||||
|
when: "lookup('vars', item, default='') == ''"
|
||||||
|
with_items:
|
||||||
|
- "matrix_bot_matrix_registration_bot_bot_password"
|
||||||
|
- "matrix_bot_matrix_registration_bot_api_base_url"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
--mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \
|
--mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \
|
||||||
--mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \
|
--mount type=bind,src={{ matrix_bot_matrix_registration_bot_data_path }},dst=/data \
|
||||||
--network={{ matrix_bot_matrix_registration_bot_container_network }} \
|
--network={{ matrix_bot_matrix_registration_bot_container_network }} \
|
||||||
{{ matrix_bot_matrix_registration_bot_docker_image }}
|
{{ matrix_bot_matrix_registration_bot_container_image }}
|
||||||
|
|
||||||
{% for network in matrix_bot_matrix_registration_bot_container_additional_networks %}
|
{% for network in matrix_bot_matrix_registration_bot_container_additional_networks %}
|
||||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-matrix-registration-bot
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-bot-matrix-registration-bot
|
||||||
|
|||||||
@@ -15,17 +15,17 @@
|
|||||||
matrix_bot_matrix_reminder_bot_enabled: true
|
matrix_bot_matrix_reminder_bot_enabled: true
|
||||||
|
|
||||||
matrix_bot_matrix_reminder_bot_container_image_self_build: false
|
matrix_bot_matrix_reminder_bot_container_image_self_build: false
|
||||||
matrix_bot_matrix_reminder_bot_docker_repo: "https://github.com/anoadragon453/matrix-reminder-bot.git"
|
matrix_bot_matrix_reminder_bot_container_repo: "https://github.com/anoadragon453/matrix-reminder-bot.git"
|
||||||
matrix_bot_matrix_reminder_bot_docker_repo_version: "{{ 'master' if matrix_bot_matrix_reminder_bot_version == 'latest' else matrix_bot_matrix_reminder_bot_version }}"
|
matrix_bot_matrix_reminder_bot_container_repo_version: "{{ 'master' if matrix_bot_matrix_reminder_bot_version == 'latest' else matrix_bot_matrix_reminder_bot_version }}"
|
||||||
matrix_bot_matrix_reminder_bot_docker_src_files_path: "{{ matrix_base_data_path }}/matrix-reminder-bot/docker-src"
|
matrix_bot_matrix_reminder_bot_container_src_files_path: "{{ matrix_base_data_path }}/matrix-reminder-bot/docker-src"
|
||||||
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/anoadragon453/matrix-reminder-bot
|
# renovate: datasource=docker depName=ghcr.io/anoadragon453/matrix-reminder-bot
|
||||||
matrix_bot_matrix_reminder_bot_version: v0.4.0
|
matrix_bot_matrix_reminder_bot_version: v0.4.0
|
||||||
matrix_bot_matrix_reminder_bot_docker_image: "{{ matrix_bot_matrix_reminder_bot_docker_image_registry_prefix }}anoadragon453/matrix-reminder-bot:{{ matrix_bot_matrix_reminder_bot_version }}"
|
matrix_bot_matrix_reminder_bot_container_image: "{{ matrix_bot_matrix_reminder_bot_container_image_registry_prefix }}anoadragon453/matrix-reminder-bot:{{ matrix_bot_matrix_reminder_bot_version }}"
|
||||||
matrix_bot_matrix_reminder_bot_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_matrix_reminder_bot_container_image_self_build else matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream }}"
|
matrix_bot_matrix_reminder_bot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_matrix_reminder_bot_container_image_self_build else matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream: "{{ matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream_default }}"
|
matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream: "{{ matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream_default: "ghcr.io/"
|
matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream_default: "ghcr.io/"
|
||||||
matrix_bot_matrix_reminder_bot_docker_image_force_pull: "{{ matrix_bot_matrix_reminder_bot_docker_image.endswith(':latest') }}"
|
matrix_bot_matrix_reminder_bot_container_image_force_pull: "{{ matrix_bot_matrix_reminder_bot_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_bot_matrix_reminder_bot_base_path: "{{ matrix_base_data_path }}/matrix-reminder-bot"
|
matrix_bot_matrix_reminder_bot_base_path: "{{ matrix_base_data_path }}/matrix-reminder-bot"
|
||||||
matrix_bot_matrix_reminder_bot_config_path: "{{ matrix_bot_matrix_reminder_bot_base_path }}/config"
|
matrix_bot_matrix_reminder_bot_config_path: "{{ matrix_bot_matrix_reminder_bot_base_path }}/config"
|
||||||
|
|||||||
@@ -42,22 +42,22 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_bot_matrix_reminder_bot_config_path }}", when: true}
|
- {path: "{{ matrix_bot_matrix_reminder_bot_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_matrix_reminder_bot_data_path }}", when: true}
|
- {path: "{{ matrix_bot_matrix_reminder_bot_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_matrix_reminder_bot_data_store_path }}", when: true}
|
- {path: "{{ matrix_bot_matrix_reminder_bot_data_store_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_matrix_reminder_bot_docker_src_files_path }}", when: true}
|
- {path: "{{ matrix_bot_matrix_reminder_bot_container_src_files_path }}", when: true}
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
- name: Ensure matrix-reminder-bot image is pulled
|
- name: Ensure matrix-reminder-bot image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_matrix_reminder_bot_docker_image }}"
|
name: "{{ matrix_bot_matrix_reminder_bot_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_bot_matrix_reminder_bot_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_matrix_reminder_bot_container_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_matrix_reminder_bot_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_reminder_bot_container_image_force_pull }}"
|
||||||
when: "not matrix_bot_matrix_reminder_bot_container_image_self_build | bool"
|
when: "not matrix_bot_matrix_reminder_bot_container_image_self_build | bool"
|
||||||
register: matrix_bot_matrix_reminder_bot_container_image_pull_result
|
register: matrix_bot_matrix_reminder_bot_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -66,9 +66,9 @@
|
|||||||
|
|
||||||
- name: Ensure matrix-reminder-bot repository is present on self-build
|
- name: Ensure matrix-reminder-bot repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_bot_matrix_reminder_bot_docker_repo }}"
|
repo: "{{ matrix_bot_matrix_reminder_bot_container_repo }}"
|
||||||
version: "{{ matrix_bot_matrix_reminder_bot_docker_repo_version }}"
|
version: "{{ matrix_bot_matrix_reminder_bot_container_repo_version }}"
|
||||||
dest: "{{ matrix_bot_matrix_reminder_bot_docker_src_files_path }}"
|
dest: "{{ matrix_bot_matrix_reminder_bot_container_src_files_path }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
|
|
||||||
- name: Ensure matrix-reminder-bot image is built
|
- name: Ensure matrix-reminder-bot image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_matrix_reminder_bot_docker_image }}"
|
name: "{{ matrix_bot_matrix_reminder_bot_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_matrix_reminder_bot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_matrix_reminder_bot_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_matrix_reminder_bot_git_pull_results.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_reminder_bot_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: docker/Dockerfile
|
dockerfile: docker/Dockerfile
|
||||||
path: "{{ matrix_bot_matrix_reminder_bot_docker_src_files_path }}"
|
path: "{{ matrix_bot_matrix_reminder_bot_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_bot_matrix_reminder_bot_container_image_self_build | bool"
|
when: "matrix_bot_matrix_reminder_bot_container_image_self_build | bool"
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_bot_matrix_reminder_bot_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_bot_matrix_reminder_bot_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_bot_matrix_reminder_bot_config_path }}/config.yaml"
|
dest: "{{ matrix_bot_matrix_reminder_bot_config_path }}/config.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_bot_matrix_reminder_bot_config_result
|
register: matrix_bot_matrix_reminder_bot_config_result
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-reminder-bot.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-reminder-bot.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_matrix_reminder_bot_systemd_service_result
|
register: matrix_bot_matrix_reminder_bot_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether matrix-reminder-bot needs a restart
|
- name: Determine whether matrix-reminder-bot needs a restart
|
||||||
|
|||||||
@@ -6,6 +6,24 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: (Deprecation) Catch and report renamed matrix-reminder-bot settings
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
Your configuration contains a variable, which now has a different name.
|
||||||
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
|
with_items:
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_container_self_build', 'new': 'matrix_bot_matrix_reminder_bot_container_image_self_build'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_container_image_name_prefix', 'new': 'matrix_bot_matrix_reminder_bot_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_image', 'new': 'matrix_bot_matrix_reminder_bot_container_image'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_image_force_pull', 'new': 'matrix_bot_matrix_reminder_bot_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_image_registry_prefix', 'new': 'matrix_bot_matrix_reminder_bot_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_repo', 'new': 'matrix_bot_matrix_reminder_bot_container_repo'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_repo_version', 'new': 'matrix_bot_matrix_reminder_bot_container_repo_version'}
|
||||||
|
- {'old': 'matrix_bot_matrix_reminder_bot_docker_src_files_path', 'new': 'matrix_bot_matrix_reminder_bot_container_src_files_path'}
|
||||||
|
|
||||||
- name: Fail if required matrix-reminder-bot settings not defined
|
- name: Fail if required matrix-reminder-bot settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -17,13 +35,3 @@
|
|||||||
- {'name': 'matrix_bot_matrix_reminder_bot_container_network', when: true}
|
- {'name': 'matrix_bot_matrix_reminder_bot_container_network', when: true}
|
||||||
- {'name': 'matrix_bot_matrix_reminder_bot_matrix_homeserver_url', when: true}
|
- {'name': 'matrix_bot_matrix_reminder_bot_matrix_homeserver_url', when: true}
|
||||||
- {'name': 'matrix_bot_matrix_reminder_bot_database_hostname', when: "{{ matrix_bot_matrix_reminder_bot_database_engine == 'postgres' }}"}
|
- {'name': 'matrix_bot_matrix_reminder_bot_database_hostname', when: "{{ matrix_bot_matrix_reminder_bot_database_engine == 'postgres' }}"}
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed matrix-reminder-bot settings
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-
|
|
||||||
Your configuration contains a variable, which now has a different name.
|
|
||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
|
||||||
with_items:
|
|
||||||
- {'old': 'matrix_bot_matrix_reminder_bot_container_self_build', 'new': 'matrix_bot_matrix_reminder_bot_container_image_self_build'}
|
|
||||||
- {'old': 'matrix_bot_matrix_reminder_bot_container_image_name_prefix', 'new': 'matrix_bot_matrix_reminder_bot_container_image_registry_prefix'}
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% for arg in matrix_bot_matrix_reminder_bot_container_extra_arguments %}
|
{% for arg in matrix_bot_matrix_reminder_bot_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_bot_matrix_reminder_bot_docker_image }} \
|
{{ matrix_bot_matrix_reminder_bot_container_image }} \
|
||||||
-c "matrix-reminder-bot /config/config.yaml"
|
-c "matrix-reminder-bot /config/config.yaml"
|
||||||
|
|
||||||
{% for network in matrix_bot_matrix_reminder_bot_container_additional_networks %}
|
{% for network in matrix_bot_matrix_reminder_bot_container_additional_networks %}
|
||||||
|
|||||||
@@ -26,37 +26,37 @@ matrix_bot_maubot_hostname: ''
|
|||||||
matrix_bot_maubot_path_prefix: /_matrix/maubot
|
matrix_bot_maubot_path_prefix: /_matrix/maubot
|
||||||
|
|
||||||
matrix_bot_maubot_container_image_self_build: false
|
matrix_bot_maubot_container_image_self_build: false
|
||||||
matrix_bot_maubot_docker_repo: "https://mau.dev/maubot/maubot.git"
|
matrix_bot_maubot_container_repo: "https://mau.dev/maubot/maubot.git"
|
||||||
matrix_bot_maubot_docker_repo_version: "{{ 'master' if matrix_bot_maubot_version == 'latest' else matrix_bot_maubot_version }}"
|
matrix_bot_maubot_container_repo_version: "{{ 'master' if matrix_bot_maubot_version == 'latest' else matrix_bot_maubot_version }}"
|
||||||
|
|
||||||
# renovate: datasource=docker depName=dock.mau.dev/maubot/maubot
|
# renovate: datasource=docker depName=dock.mau.dev/maubot/maubot
|
||||||
matrix_bot_maubot_version: v0.6.0
|
matrix_bot_maubot_version: v0.6.0
|
||||||
matrix_bot_maubot_docker_image: "{{ matrix_bot_maubot_docker_image_registry_prefix }}maubot/maubot:{{ matrix_bot_maubot_version }}"
|
matrix_bot_maubot_container_image: "{{ matrix_bot_maubot_container_image_registry_prefix }}maubot/maubot:{{ matrix_bot_maubot_version }}"
|
||||||
matrix_bot_maubot_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_maubot_container_image_self_build else matrix_bot_maubot_docker_image_registry_prefix_upstream }}"
|
matrix_bot_maubot_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_maubot_container_image_self_build else matrix_bot_maubot_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_maubot_docker_image_registry_prefix_upstream: "{{ matrix_bot_maubot_docker_image_registry_prefix_upstream_default }}"
|
matrix_bot_maubot_container_image_registry_prefix_upstream: "{{ matrix_bot_maubot_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_bot_maubot_docker_image_registry_prefix_upstream_default: "dock.mau.dev/"
|
matrix_bot_maubot_container_image_registry_prefix_upstream_default: "dock.mau.dev/"
|
||||||
matrix_bot_maubot_docker_image_force_pull: "{{ matrix_bot_maubot_docker_image.endswith(':latest') }}"
|
matrix_bot_maubot_container_image_force_pull: "{{ matrix_bot_maubot_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
# matrix_bot_maubot_docker_image_customized is the name of the locally built maubot image
|
# matrix_bot_maubot_container_image_customized is the name of the locally built maubot image
|
||||||
# which adds various customizations on top of the original (upstream) maubot image.
|
# which adds various customizations on top of the original (upstream) maubot image.
|
||||||
# This image will be based on the upstream `matrix_bot_maubot_docker_image` image, only if `matrix_bot_maubot_container_image_customizations_enabled: true`.
|
# This image will be based on the upstream `matrix_bot_maubot_container_image` image, only if `matrix_bot_maubot_container_image_customizations_enabled: true`.
|
||||||
matrix_bot_maubot_docker_image_customized: "localhost/maubot/maubot:{{ matrix_bot_maubot_version }}-customized"
|
matrix_bot_maubot_container_image_customized: "localhost/maubot/maubot:{{ matrix_bot_maubot_version }}-customized"
|
||||||
|
|
||||||
# Controls whether the customized image (`matrix_bot_maubot_docker_image_customized`) is to be force-built without layer caching enabled.
|
# Controls whether the customized image (`matrix_bot_maubot_container_image_customized`) is to be force-built without layer caching enabled.
|
||||||
matrix_bot_maubot_docker_image_customized_build_nocache: false
|
matrix_bot_maubot_container_image_customized_build_nocache: false
|
||||||
|
|
||||||
# Controls whether the customized image (`matrix_bot_maubot_docker_image_customized`) is to be built, even if it already exists.
|
# Controls whether the customized image (`matrix_bot_maubot_container_image_customized`) is to be built, even if it already exists.
|
||||||
# Related to: matrix_bot_maubot_docker_image_customized_build_nocache
|
# Related to: matrix_bot_maubot_container_image_customized_build_nocache
|
||||||
matrix_bot_maubot_docker_image_customized_force_source: "{{ matrix_bot_maubot_docker_image_customized_build_nocache }}"
|
matrix_bot_maubot_container_image_customized_force_source: "{{ matrix_bot_maubot_container_image_customized_build_nocache }}"
|
||||||
|
|
||||||
# matrix_bot_maubot_docker_image_final holds the name of the maubot image to run depending on whether or not customizations are enabled.
|
# matrix_bot_maubot_container_image_final holds the name of the maubot image to run depending on whether or not customizations are enabled.
|
||||||
matrix_bot_maubot_docker_image_final: "{{ matrix_bot_maubot_docker_image_customized if matrix_bot_maubot_container_image_customizations_enabled else matrix_bot_maubot_docker_image }} "
|
matrix_bot_maubot_container_image_final: "{{ matrix_bot_maubot_container_image_customized if matrix_bot_maubot_container_image_customizations_enabled else matrix_bot_maubot_container_image }} "
|
||||||
|
|
||||||
matrix_bot_maubot_base_path: "{{ matrix_base_data_path }}/maubot"
|
matrix_bot_maubot_base_path: "{{ matrix_base_data_path }}/maubot"
|
||||||
matrix_bot_maubot_data_path: "{{ matrix_bot_maubot_base_path }}/data"
|
matrix_bot_maubot_data_path: "{{ matrix_bot_maubot_base_path }}/data"
|
||||||
matrix_bot_maubot_config_path: "{{ matrix_bot_maubot_base_path }}/config"
|
matrix_bot_maubot_config_path: "{{ matrix_bot_maubot_base_path }}/config"
|
||||||
matrix_bot_maubot_docker_src_files_path: "{{ matrix_bot_maubot_base_path }}/docker-src"
|
matrix_bot_maubot_container_src_files_path: "{{ matrix_bot_maubot_base_path }}/docker-src"
|
||||||
matrix_bot_maubot_customized_docker_src_files_path: "{{ matrix_bot_maubot_base_path }}/customized-docker-src"
|
matrix_bot_maubot_customized_container_src_files_path: "{{ matrix_bot_maubot_base_path }}/customized-docker-src"
|
||||||
|
|
||||||
matrix_bot_maubot_bot_server_public_url: "{{ matrix_bot_maubot_scheme }}://{{ matrix_bot_maubot_hostname }}"
|
matrix_bot_maubot_bot_server_public_url: "{{ matrix_bot_maubot_scheme }}://{{ matrix_bot_maubot_hostname }}"
|
||||||
matrix_bot_maubot_bot_server_base_path: "{{ matrix_bot_maubot_path_prefix }}/v1"
|
matrix_bot_maubot_bot_server_base_path: "{{ matrix_bot_maubot_path_prefix }}/v1"
|
||||||
@@ -124,12 +124,12 @@ matrix_bot_maubot_container_additional_networks_custom: []
|
|||||||
# See:
|
# See:
|
||||||
# - `roles/custom/matrix-bot-maubot/templates/maubot/customizations/Dockerfile.j2`
|
# - `roles/custom/matrix-bot-maubot/templates/maubot/customizations/Dockerfile.j2`
|
||||||
# - `matrix_bot_maubot_container_image_customizations_dockerfile_body_custom`
|
# - `matrix_bot_maubot_container_image_customizations_dockerfile_body_custom`
|
||||||
# - `matrix_bot_maubot_docker_image_customized`
|
# - `matrix_bot_maubot_container_image_customized`
|
||||||
# - `matrix_bot_maubot_docker_image_final`
|
# - `matrix_bot_maubot_container_image_final`
|
||||||
matrix_bot_maubot_container_image_customizations_enabled: false
|
matrix_bot_maubot_container_image_customizations_enabled: false
|
||||||
|
|
||||||
# matrix_bot_maubot_container_image_customizations_dockerfile_body contains your custom Dockerfile steps
|
# matrix_bot_maubot_container_image_customizations_dockerfile_body contains your custom Dockerfile steps
|
||||||
# for building your customized maubot image based on the original (upstream) image (`matrix_bot_maubot_docker_image`).
|
# for building your customized maubot image based on the original (upstream) image (`matrix_bot_maubot_container_image`).
|
||||||
# A `FROM …` clause is included automatically so you don't have to.
|
# A `FROM …` clause is included automatically so you don't have to.
|
||||||
#
|
#
|
||||||
# For this to take effect, you need to enable customizations (`matrix_bot_maubot_container_image_customizations_enabled: true`).
|
# For this to take effect, you need to enable customizations (`matrix_bot_maubot_container_image_customizations_enabled: true`).
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: '0755'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
- {path: "{{ matrix_bot_maubot_data_path }}/plugins", when: true}
|
- {path: "{{ matrix_bot_maubot_data_path }}/plugins", when: true}
|
||||||
- {path: "{{ matrix_bot_maubot_data_path }}/dbs", when: true}
|
- {path: "{{ matrix_bot_maubot_data_path }}/dbs", when: true}
|
||||||
- {path: "{{ matrix_bot_maubot_data_path }}/trash", when: true}
|
- {path: "{{ matrix_bot_maubot_data_path }}/trash", when: true}
|
||||||
- {path: "{{ matrix_bot_maubot_docker_src_files_path }}", when: "{{ matrix_bot_maubot_container_image_self_build }}"}
|
- {path: "{{ matrix_bot_maubot_container_src_files_path }}", when: "{{ matrix_bot_maubot_container_image_self_build }}"}
|
||||||
- {path: "{{ matrix_bot_maubot_customized_docker_src_files_path }}", when: "{{ matrix_bot_maubot_container_image_customizations_enabled }}"}
|
- {path: "{{ matrix_bot_maubot_customized_container_src_files_path }}", when: "{{ matrix_bot_maubot_container_image_customizations_enabled }}"}
|
||||||
when: "item.when|bool"
|
when: "item.when|bool"
|
||||||
|
|
||||||
- name: Ensure maubot configuration file created
|
- name: Ensure maubot configuration file created
|
||||||
@@ -38,10 +38,10 @@
|
|||||||
|
|
||||||
- name: Ensure maubot image is pulled
|
- name: Ensure maubot image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_maubot_docker_image }}"
|
name: "{{ matrix_bot_maubot_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_bot_maubot_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_maubot_container_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_maubot_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_maubot_container_image_force_pull }}"
|
||||||
when: "not matrix_bot_maubot_container_image_self_build|bool"
|
when: "not matrix_bot_maubot_container_image_self_build|bool"
|
||||||
register: matrix_bot_maubot_container_image_pull_result
|
register: matrix_bot_maubot_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -52,9 +52,9 @@
|
|||||||
block:
|
block:
|
||||||
- name: Ensure maubot repository is present on self-build
|
- name: Ensure maubot repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_bot_maubot_docker_repo }}"
|
repo: "{{ matrix_bot_maubot_container_repo }}"
|
||||||
version: "{{ matrix_bot_maubot_docker_repo_version }}"
|
version: "{{ matrix_bot_maubot_container_repo_version }}"
|
||||||
dest: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
dest: "{{ matrix_bot_maubot_container_src_files_path }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -62,13 +62,13 @@
|
|||||||
|
|
||||||
- name: Ensure maubot image is built
|
- name: Ensure maubot image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_maubot_docker_image }}"
|
name: "{{ matrix_bot_maubot_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_maubot_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_maubot_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_maubot_git_pull_results.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_maubot_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_bot_maubot_docker_src_files_path }}"
|
path: "{{ matrix_bot_maubot_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
|
|
||||||
- when: "matrix_bot_maubot_container_image_customizations_enabled | bool"
|
- when: "matrix_bot_maubot_container_image_customizations_enabled | bool"
|
||||||
@@ -76,27 +76,27 @@
|
|||||||
- name: Ensure customizations Dockerfile is created
|
- name: Ensure customizations Dockerfile is created
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/customizations/Dockerfile.j2"
|
src: "{{ role_path }}/templates/customizations/Dockerfile.j2"
|
||||||
dest: "{{ matrix_bot_maubot_customized_docker_src_files_path }}/Dockerfile"
|
dest: "{{ matrix_bot_maubot_customized_container_src_files_path }}/Dockerfile"
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
register: matrix_bot_maubot_container_image_customizations_dockerfile_result
|
register: matrix_bot_maubot_container_image_customizations_dockerfile_result
|
||||||
|
|
||||||
- name: Ensure customized Docker image for maubot is built
|
- name: Ensure customized Docker image for maubot is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_maubot_docker_image_customized }}"
|
name: "{{ matrix_bot_maubot_container_image_customized }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_maubot_container_image_customizations_dockerfile_result.changed or matrix_bot_maubot_docker_image_customized_force_source }}"
|
force_source: "{{ matrix_bot_maubot_container_image_customizations_dockerfile_result.changed or matrix_bot_maubot_container_image_customized_force_source }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_bot_maubot_customized_docker_src_files_path }}"
|
path: "{{ matrix_bot_maubot_customized_container_src_files_path }}"
|
||||||
nocache: "{{ matrix_bot_maubot_docker_image_customized_build_nocache }}"
|
nocache: "{{ matrix_bot_maubot_container_image_customized_build_nocache }}"
|
||||||
|
|
||||||
- name: Ensure maubot support files installed
|
- name: Ensure maubot support files installed
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||||
dest: "{{ matrix_bot_maubot_base_path }}/{{ item }}"
|
dest: "{{ matrix_bot_maubot_base_path }}/{{ item }}"
|
||||||
mode: 0640
|
mode: '0640'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_maubot_systemd_service_result
|
register: matrix_bot_maubot_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether maubot needs a restart
|
- name: Determine whether maubot needs a restart
|
||||||
|
|||||||
@@ -18,6 +18,19 @@
|
|||||||
- {'old': 'matrix_bot_maubot_management_interface_http_bind_port', 'new': 'matrix_bot_maubot_container_management_interface_http_bind_port'}
|
- {'old': 'matrix_bot_maubot_management_interface_http_bind_port', 'new': 'matrix_bot_maubot_container_management_interface_http_bind_port'}
|
||||||
- {'old': 'matrix_bot_maubot_registration_shared_secret', 'new': 'matrix_bot_maubot_homeserver_secret'}
|
- {'old': 'matrix_bot_maubot_registration_shared_secret', 'new': 'matrix_bot_maubot_homeserver_secret'}
|
||||||
- {'old': 'matrix_bot_maubot_container_image_name_prefix', 'new': 'matrix_bot_maubot_container_image_registry_prefix'}
|
- {'old': 'matrix_bot_maubot_container_image_name_prefix', 'new': 'matrix_bot_maubot_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image', 'new': 'matrix_bot_maubot_container_image'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_customized', 'new': 'matrix_bot_maubot_container_image_customized'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_customized_build_nocache', 'new': 'matrix_bot_maubot_container_image_customized_build_nocache'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_customized_force_source', 'new': 'matrix_bot_maubot_container_image_customized_force_source'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_final', 'new': 'matrix_bot_maubot_container_image_final'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_force_pull', 'new': 'matrix_bot_maubot_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_registry_prefix', 'new': 'matrix_bot_maubot_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_maubot_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_maubot_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_repo', 'new': 'matrix_bot_maubot_container_repo'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_repo_version', 'new': 'matrix_bot_maubot_container_repo_version'}
|
||||||
|
- {'old': 'matrix_bot_maubot_docker_src_files_path', 'new': 'matrix_bot_maubot_container_src_files_path'}
|
||||||
|
- {'old': 'matrix_bot_maubot_customized_docker_src_files_path', 'new': 'matrix_bot_maubot_customized_container_src_files_path'}
|
||||||
|
|
||||||
- name: Fail if required maubot settings not defined
|
- name: Fail if required maubot settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#jinja2: lstrip_blocks: True
|
#jinja2: lstrip_blocks: True
|
||||||
FROM {{ matrix_bot_maubot_docker_image }}
|
FROM {{ matrix_bot_maubot_container_image }}
|
||||||
|
|
||||||
{{ matrix_bot_maubot_container_image_customizations_dockerfile_body_custom }}
|
{{ matrix_bot_maubot_container_image_customizations_dockerfile_body_custom }}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% if matrix_bot_maubot_container_management_interface_http_bind_port %}
|
{% if matrix_bot_maubot_container_management_interface_http_bind_port %}
|
||||||
-p {{ matrix_bot_maubot_container_management_interface_http_bind_port }}:{{ matrix_bot_maubot_server_port }} \
|
-p {{ matrix_bot_maubot_container_management_interface_http_bind_port }}:{{ matrix_bot_maubot_server_port }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ matrix_bot_maubot_docker_image_final }} \
|
{{ matrix_bot_maubot_container_image_final }} \
|
||||||
python3 -m maubot -c /config/config.yaml --no-update
|
python3 -m maubot -c /config/config.yaml --no-update
|
||||||
|
|
||||||
{% for network in matrix_bot_maubot_container_additional_networks %}
|
{% for network in matrix_bot_maubot_container_additional_networks %}
|
||||||
|
|||||||
@@ -17,21 +17,21 @@
|
|||||||
matrix_bot_mjolnir_enabled: true
|
matrix_bot_mjolnir_enabled: true
|
||||||
|
|
||||||
# renovate: datasource=docker depName=matrixdotorg/mjolnir
|
# renovate: datasource=docker depName=matrixdotorg/mjolnir
|
||||||
matrix_bot_mjolnir_version: "v1.11.0"
|
matrix_bot_mjolnir_version: "v1.12.1"
|
||||||
|
|
||||||
matrix_bot_mjolnir_container_image_self_build: false
|
matrix_bot_mjolnir_container_image_self_build: false
|
||||||
matrix_bot_mjolnir_container_image_self_build_repo: "https://github.com/matrix-org/mjolnir.git"
|
matrix_bot_mjolnir_container_image_self_build_repo: "https://github.com/matrix-org/mjolnir.git"
|
||||||
|
|
||||||
matrix_bot_mjolnir_docker_image: "{{ matrix_bot_mjolnir_docker_image_registry_prefix }}matrixdotorg/mjolnir:{{ matrix_bot_mjolnir_version }}"
|
matrix_bot_mjolnir_container_image: "{{ matrix_bot_mjolnir_container_image_registry_prefix }}matrixdotorg/mjolnir:{{ matrix_bot_mjolnir_version }}"
|
||||||
matrix_bot_mjolnir_docker_image_registry_prefix: "{{ 'localhost/' if matrix_bot_mjolnir_container_image_self_build else matrix_bot_mjolnir_docker_image_registry_prefix_upstream }}"
|
matrix_bot_mjolnir_container_image_registry_prefix: "{{ 'localhost/' if matrix_bot_mjolnir_container_image_self_build else matrix_bot_mjolnir_container_image_registry_prefix_upstream }}"
|
||||||
matrix_bot_mjolnir_docker_image_registry_prefix_upstream: "{{ matrix_bot_mjolnir_docker_image_registry_prefix_upstream_default }}"
|
matrix_bot_mjolnir_container_image_registry_prefix_upstream: "{{ matrix_bot_mjolnir_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_bot_mjolnir_docker_image_registry_prefix_upstream_default: "docker.io/"
|
matrix_bot_mjolnir_container_image_registry_prefix_upstream_default: "docker.io/"
|
||||||
matrix_bot_mjolnir_docker_image_force_pull: "{{ matrix_bot_mjolnir_docker_image.endswith(':latest') }}"
|
matrix_bot_mjolnir_container_image_force_pull: "{{ matrix_bot_mjolnir_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_bot_mjolnir_base_path: "{{ matrix_base_data_path }}/mjolnir"
|
matrix_bot_mjolnir_base_path: "{{ matrix_base_data_path }}/mjolnir"
|
||||||
matrix_bot_mjolnir_config_path: "{{ matrix_bot_mjolnir_base_path }}/config"
|
matrix_bot_mjolnir_config_path: "{{ matrix_bot_mjolnir_base_path }}/config"
|
||||||
matrix_bot_mjolnir_data_path: "{{ matrix_bot_mjolnir_base_path }}/data"
|
matrix_bot_mjolnir_data_path: "{{ matrix_bot_mjolnir_base_path }}/data"
|
||||||
matrix_bot_mjolnir_docker_src_files_path: "{{ matrix_bot_mjolnir_base_path }}/docker-src"
|
matrix_bot_mjolnir_container_src_files_path: "{{ matrix_bot_mjolnir_base_path }}/docker-src"
|
||||||
|
|
||||||
matrix_bot_mjolnir_container_network: ""
|
matrix_bot_mjolnir_container_network: ""
|
||||||
|
|
||||||
|
|||||||
@@ -17,22 +17,22 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_bot_mjolnir_base_path }}", when: true}
|
- {path: "{{ matrix_bot_mjolnir_base_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_mjolnir_config_path }}", when: true}
|
- {path: "{{ matrix_bot_mjolnir_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_mjolnir_data_path }}", when: true}
|
- {path: "{{ matrix_bot_mjolnir_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_bot_mjolnir_docker_src_files_path }}", when: "{{ matrix_bot_mjolnir_container_image_self_build }}"}
|
- {path: "{{ matrix_bot_mjolnir_container_src_files_path }}", when: "{{ matrix_bot_mjolnir_container_image_self_build }}"}
|
||||||
when: "item.when | bool"
|
when: "item.when | bool"
|
||||||
|
|
||||||
- name: Ensure mjolnir Docker image is pulled
|
- name: Ensure mjolnir Docker image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_mjolnir_docker_image }}"
|
name: "{{ matrix_bot_mjolnir_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_bot_mjolnir_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_bot_mjolnir_container_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_mjolnir_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_mjolnir_container_image_force_pull }}"
|
||||||
when: "not matrix_bot_mjolnir_container_image_self_build | bool"
|
when: "not matrix_bot_mjolnir_container_image_self_build | bool"
|
||||||
register: matrix_bot_mjolnir_container_image_pull_result
|
register: matrix_bot_mjolnir_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
- name: Ensure mjolnir repository is present on self-build
|
- name: Ensure mjolnir repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_bot_mjolnir_container_image_self_build_repo }}"
|
repo: "{{ matrix_bot_mjolnir_container_image_self_build_repo }}"
|
||||||
dest: "{{ matrix_bot_mjolnir_docker_src_files_path }}"
|
dest: "{{ matrix_bot_mjolnir_container_src_files_path }}"
|
||||||
version: "{{ matrix_bot_mjolnir_docker_image.split(':')[1] }}"
|
version: "{{ matrix_bot_mjolnir_container_image.split(':')[1] }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -52,12 +52,12 @@
|
|||||||
|
|
||||||
- name: Ensure mjolnir Docker image is built
|
- name: Ensure mjolnir Docker image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_bot_mjolnir_docker_image }}"
|
name: "{{ matrix_bot_mjolnir_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_bot_mjolnir_git_pull_results.changed }}"
|
force_source: "{{ matrix_bot_mjolnir_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_bot_mjolnir_docker_src_files_path }}"
|
path: "{{ matrix_bot_mjolnir_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_bot_mjolnir_container_image_self_build | bool"
|
when: "matrix_bot_mjolnir_container_image_self_build | bool"
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_bot_mjolnir_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_bot_mjolnir_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_bot_mjolnir_config_path }}/production.yaml"
|
dest: "{{ matrix_bot_mjolnir_config_path }}/production.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_bot_mjolnir_config_result
|
register: matrix_bot_mjolnir_config_result
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-bot-mjolnir.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-bot-mjolnir.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_bot_mjolnir_systemd_service_result
|
register: matrix_bot_mjolnir_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Mjolnir needs a restart
|
- name: Determine whether Mjolnir needs a restart
|
||||||
|
|||||||
@@ -7,6 +7,21 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: (Deprecation) Catch and report renamed Mjolnir settings
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
Your configuration contains a variable, which now has a different name.
|
||||||
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
|
with_items:
|
||||||
|
- {'old': 'matrix_bot_mjolnir_container_image_name_prefix', 'new': 'matrix_bot_mjolnir_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_mjolnir_docker_image', 'new': 'matrix_bot_mjolnir_container_image'}
|
||||||
|
- {'old': 'matrix_bot_mjolnir_docker_image_force_pull', 'new': 'matrix_bot_mjolnir_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_bot_mjolnir_docker_image_registry_prefix', 'new': 'matrix_bot_mjolnir_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_bot_mjolnir_docker_image_registry_prefix_upstream', 'new': 'matrix_bot_mjolnir_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_bot_mjolnir_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bot_mjolnir_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_bot_mjolnir_docker_src_files_path', 'new': 'matrix_bot_mjolnir_container_src_files_path'}
|
||||||
|
|
||||||
- name: Fail if required matrix-bot-mjolnir variables are undefined
|
- name: Fail if required matrix-bot-mjolnir variables are undefined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: "The `{{ item.name }}` variable must be defined and have a non-null value."
|
msg: "The `{{ item.name }}` variable must be defined and have a non-null value."
|
||||||
@@ -26,12 +41,3 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- {'name': 'matrix_bot_mjolnir_access_token', when: "{{ matrix_bot_mjolnir_pantalaimon_use }}"}
|
- {'name': 'matrix_bot_mjolnir_access_token', when: "{{ matrix_bot_mjolnir_pantalaimon_use }}"}
|
||||||
when: "item.when | bool and not (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"
|
when: "item.when | bool and not (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed Mjolnir settings
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-
|
|
||||||
Your configuration contains a variable, which now has a different name.
|
|
||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
|
||||||
with_items:
|
|
||||||
- {'old': 'matrix_bot_mjolnir_container_image_name_prefix', 'new': 'matrix_bot_mjolnir_container_image_registry_prefix'}
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% for arg in matrix_bot_mjolnir_container_extra_arguments %}
|
{% for arg in matrix_bot_mjolnir_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_bot_mjolnir_docker_image }} \
|
{{ matrix_bot_mjolnir_container_image }} \
|
||||||
bot --mjolnir-config /data/config/production.yaml
|
bot --mjolnir-config /data/config/production.yaml
|
||||||
|
|
||||||
{% for network in matrix_bot_mjolnir_container_additional_networks %}
|
{% for network in matrix_bot_mjolnir_container_additional_networks %}
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ matrix_appservice_discord_container_image_self_build: false
|
|||||||
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/matrix-org/matrix-appservice-discord
|
# renovate: datasource=docker depName=ghcr.io/matrix-org/matrix-appservice-discord
|
||||||
matrix_appservice_discord_version: v4.0.0
|
matrix_appservice_discord_version: v4.0.0
|
||||||
matrix_appservice_discord_docker_image: "{{ matrix_appservice_discord_docker_image_registry_prefix }}matrix-org/matrix-appservice-discord:{{ matrix_appservice_discord_version }}"
|
matrix_appservice_discord_container_image: "{{ matrix_appservice_discord_container_image_registry_prefix }}matrix-org/matrix-appservice-discord:{{ matrix_appservice_discord_version }}"
|
||||||
matrix_appservice_discord_docker_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_discord_container_image_self_build else matrix_appservice_discord_docker_image_registry_prefix_upstream }}"
|
matrix_appservice_discord_container_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_discord_container_image_self_build else matrix_appservice_discord_container_image_registry_prefix_upstream }}"
|
||||||
matrix_appservice_discord_docker_image_registry_prefix_upstream: "{{ matrix_appservice_discord_docker_image_registry_prefix_upstream_default }}"
|
matrix_appservice_discord_container_image_registry_prefix_upstream: "{{ matrix_appservice_discord_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_appservice_discord_docker_image_registry_prefix_upstream_default: "ghcr.io/"
|
matrix_appservice_discord_container_image_registry_prefix_upstream_default: "ghcr.io/"
|
||||||
matrix_appservice_discord_docker_image_force_pull: "{{ matrix_appservice_discord_docker_image.endswith(':latest') }}"
|
matrix_appservice_discord_container_image_force_pull: "{{ matrix_appservice_discord_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_appservice_discord_base_path: "{{ matrix_base_data_path }}/appservice-discord"
|
matrix_appservice_discord_base_path: "{{ matrix_base_data_path }}/appservice-discord"
|
||||||
matrix_appservice_discord_config_path: "{{ matrix_base_data_path }}/appservice-discord/config"
|
matrix_appservice_discord_config_path: "{{ matrix_base_data_path }}/appservice-discord/config"
|
||||||
|
|||||||
@@ -42,10 +42,10 @@
|
|||||||
|
|
||||||
- name: Ensure Appservice Discord image is pulled
|
- name: Ensure Appservice Discord image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_discord_docker_image }}"
|
name: "{{ matrix_appservice_discord_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_appservice_discord_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_discord_container_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_appservice_discord_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_discord_container_image_force_pull }}"
|
||||||
register: matrix_appservice_discord_container_image_pull_result
|
register: matrix_appservice_discord_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_discord_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_discord_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_discord_config_path }}/config.yaml"
|
dest: "{{ matrix_appservice_discord_config_path }}/config.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_discord_config_result
|
register: matrix_appservice_discord_config_result
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_discord_registration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_discord_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_discord_config_path }}/registration.yaml"
|
dest: "{{ matrix_appservice_discord_config_path }}/registration.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_discord_registration_result
|
register: matrix_appservice_discord_registration_result
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
--cap-drop=ALL
|
--cap-drop=ALL
|
||||||
--mount type=bind,src={{ matrix_appservice_discord_config_path }},dst=/cfg
|
--mount type=bind,src={{ matrix_appservice_discord_config_path }},dst=/cfg
|
||||||
-w /cfg
|
-w /cfg
|
||||||
{{ matrix_appservice_discord_docker_image }}
|
{{ matrix_appservice_discord_container_image }}
|
||||||
/bin/sh -c "node /build/tools/addbot.js > /cfg/invite_link"
|
/bin/sh -c "node /build/tools/addbot.js > /cfg/invite_link"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-appservice-discord.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-appservice-discord.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_appservice_discord_systemd_service_result
|
register: matrix_appservice_discord_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether matrix-appservice-discord needs a restart
|
- name: Determine whether matrix-appservice-discord needs a restart
|
||||||
|
|||||||
@@ -5,6 +5,21 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: (Deprecation) Catch and report renamed appservice-discord variables
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
Your configuration contains a variable, which now has a different name.
|
||||||
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
|
with_items:
|
||||||
|
- {'old': 'matrix_appservice_discord_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_discord_container_http_host_bind_port>'}
|
||||||
|
- {'old': 'matrix_appservice_discord_container_image_name_prefix', 'new': 'matrix_appservice_discord_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_discord_docker_image', 'new': 'matrix_appservice_discord_container_image'}
|
||||||
|
- {'old': 'matrix_appservice_discord_docker_image_force_pull', 'new': 'matrix_appservice_discord_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_appservice_discord_docker_image_registry_prefix', 'new': 'matrix_appservice_discord_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_discord_docker_image_registry_prefix_upstream', 'new': 'matrix_appservice_discord_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_appservice_discord_docker_image_registry_prefix_upstream_default', 'new': 'matrix_appservice_discord_container_image_registry_prefix_upstream_default'}
|
||||||
|
|
||||||
- name: Fail if required appservice-discord settings not defined
|
- name: Fail if required appservice-discord settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -19,16 +34,6 @@
|
|||||||
- {'name': 'matrix_appservice_discord_container_network', when: true}
|
- {'name': 'matrix_appservice_discord_container_network', when: true}
|
||||||
- {'name': 'matrix_appservice_discord_database_hostname', when: "{{ matrix_appservice_discord_database_engine == 'postgres' }}"}
|
- {'name': 'matrix_appservice_discord_database_hostname', when: "{{ matrix_appservice_discord_database_engine == 'postgres' }}"}
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed appservice-discord variables
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-
|
|
||||||
Your configuration contains a variable, which now has a different name.
|
|
||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
|
||||||
with_items:
|
|
||||||
- {'old': 'matrix_appservice_discord_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_discord_container_http_host_bind_port>'}
|
|
||||||
- {'old': 'matrix_appservice_discord_container_image_name_prefix', 'new': 'matrix_appservice_discord_docker_image_registry_prefix'}
|
|
||||||
|
|
||||||
- name: Require a valid database engine
|
- name: Require a valid database engine
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: "`matrix_appservice_discord_database_engine` needs to be either 'sqlite' or 'postgres'"
|
msg: "`matrix_appservice_discord_database_engine` needs to be either 'sqlite' or 'postgres'"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{% for arg in matrix_appservice_discord_container_extra_arguments %}
|
{% for arg in matrix_appservice_discord_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_appservice_discord_docker_image }} \
|
{{ matrix_appservice_discord_container_image }} \
|
||||||
node /build/src/discordas.js -p 9005 -c /cfg/config.yaml -f /cfg/registration.yaml
|
node /build/src/discordas.js -p 9005 -c /cfg/config.yaml -f /cfg/registration.yaml
|
||||||
|
|
||||||
{% for network in matrix_appservice_discord_container_additional_networks %}
|
{% for network in matrix_appservice_discord_container_additional_networks %}
|
||||||
|
|||||||
@@ -26,20 +26,20 @@
|
|||||||
matrix_appservice_irc_enabled: true
|
matrix_appservice_irc_enabled: true
|
||||||
|
|
||||||
matrix_appservice_irc_container_image_self_build: false
|
matrix_appservice_irc_container_image_self_build: false
|
||||||
matrix_appservice_irc_docker_repo: "https://github.com/matrix-org/matrix-appservice-irc.git"
|
matrix_appservice_irc_container_repo: "https://github.com/matrix-org/matrix-appservice-irc.git"
|
||||||
matrix_appservice_irc_docker_repo_version: "{{ 'master' if matrix_appservice_irc_version == 'latest' else matrix_appservice_irc_version }}"
|
matrix_appservice_irc_container_repo_version: "{{ 'master' if matrix_appservice_irc_version == 'latest' else matrix_appservice_irc_version }}"
|
||||||
matrix_appservice_irc_docker_src_files_path: "{{ matrix_base_data_path }}/appservice-irc/docker-src"
|
matrix_appservice_irc_container_src_files_path: "{{ matrix_base_data_path }}/appservice-irc/docker-src"
|
||||||
|
|
||||||
# matrix_appservice_irc_version used to contain the full Docker image tag (e.g. `release-X.X.X`).
|
# matrix_appservice_irc_version used to contain the full Docker image tag (e.g. `release-X.X.X`).
|
||||||
# It's a bare version number now. We try to somewhat retain compatibility below.
|
# It's a bare version number now. We try to somewhat retain compatibility below.
|
||||||
# renovate: datasource=docker depName=docker.io/matrixdotorg/matrix-appservice-irc
|
# renovate: datasource=docker depName=docker.io/matrixdotorg/matrix-appservice-irc
|
||||||
matrix_appservice_irc_version: 4.0.0
|
matrix_appservice_irc_version: 4.0.0
|
||||||
matrix_appservice_irc_docker_image: "{{ matrix_appservice_irc_docker_image_registry_prefix }}matrixdotorg/matrix-appservice-irc:{{ matrix_appservice_irc_docker_image_tag }}"
|
matrix_appservice_irc_container_image: "{{ matrix_appservice_irc_container_image_registry_prefix }}matrixdotorg/matrix-appservice-irc:{{ matrix_appservice_irc_container_image_tag }}"
|
||||||
matrix_appservice_irc_docker_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_irc_container_image_self_build else matrix_appservice_irc_docker_image_registry_prefix_upstream }}"
|
matrix_appservice_irc_container_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_irc_container_image_self_build else matrix_appservice_irc_container_image_registry_prefix_upstream }}"
|
||||||
matrix_appservice_irc_docker_image_registry_prefix_upstream: "{{ matrix_appservice_irc_docker_image_registry_prefix_upstream_default }}"
|
matrix_appservice_irc_container_image_registry_prefix_upstream: "{{ matrix_appservice_irc_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_appservice_irc_docker_image_registry_prefix_upstream_default: docker.io/
|
matrix_appservice_irc_container_image_registry_prefix_upstream_default: docker.io/
|
||||||
matrix_appservice_irc_docker_image_tag: "{{ 'latest' if matrix_appservice_irc_version == 'latest' else ('release-' + matrix_appservice_irc_version) }}"
|
matrix_appservice_irc_container_image_tag: "{{ 'latest' if matrix_appservice_irc_version == 'latest' else ('release-' + matrix_appservice_irc_version) }}"
|
||||||
matrix_appservice_irc_docker_image_force_pull: "{{ matrix_appservice_irc_docker_image.endswith(':latest') }}"
|
matrix_appservice_irc_container_image_force_pull: "{{ matrix_appservice_irc_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc"
|
matrix_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc"
|
||||||
matrix_appservice_irc_config_path: "{{ matrix_appservice_irc_base_path }}/config"
|
matrix_appservice_irc_config_path: "{{ matrix_appservice_irc_base_path }}/config"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
--mount type=bind,src={{ matrix_appservice_irc_data_path }},dst=/data
|
--mount type=bind,src={{ matrix_appservice_irc_data_path }},dst=/data
|
||||||
--entrypoint=/bin/sh
|
--entrypoint=/bin/sh
|
||||||
{{ matrix_appservice_irc_docker_image }}
|
{{ matrix_appservice_irc_container_image }}
|
||||||
-c
|
-c
|
||||||
'/usr/local/bin/node /app/lib/scripts/migrate-db-to-pgres.js --dbdir /data --privateKey /data/passkey.pem --connectionString {{ matrix_appservice_irc_database_connection_string }}'
|
'/usr/local/bin/node /app/lib/scripts/migrate-db-to-pgres.js --dbdir /data --privateKey /data/passkey.pem --connectionString {{ matrix_appservice_irc_database_connection_string }}'
|
||||||
register: matrix_appservice_irc_import_nedb_to_postgres_result
|
register: matrix_appservice_irc_import_nedb_to_postgres_result
|
||||||
|
|||||||
@@ -22,14 +22,14 @@
|
|||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_appservice_irc_base_path }}", when: true}
|
- {path: "{{ matrix_appservice_irc_base_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_irc_config_path }}", when: true}
|
- {path: "{{ matrix_appservice_irc_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_irc_data_path }}", when: true}
|
- {path: "{{ matrix_appservice_irc_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_irc_docker_src_files_path }}", when: "{{ matrix_appservice_irc_container_image_self_build }}"}
|
- {path: "{{ matrix_appservice_irc_container_src_files_path }}", when: "{{ matrix_appservice_irc_container_image_self_build }}"}
|
||||||
when: item.when | bool
|
when: item.when | bool
|
||||||
|
|
||||||
- name: Check if an old passkey file already exists
|
- name: Check if an old passkey file already exists
|
||||||
@@ -81,10 +81,10 @@
|
|||||||
|
|
||||||
- name: Ensure Appservice IRC image is pulled
|
- name: Ensure Appservice IRC image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_irc_docker_image }}"
|
name: "{{ matrix_appservice_irc_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_appservice_irc_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_irc_container_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_appservice_irc_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_irc_container_image_force_pull }}"
|
||||||
when: "matrix_appservice_irc_enabled | bool and not matrix_appservice_irc_container_image_self_build | bool"
|
when: "matrix_appservice_irc_enabled | bool and not matrix_appservice_irc_container_image_self_build | bool"
|
||||||
register: matrix_appservice_irc_container_image_pull_result
|
register: matrix_appservice_irc_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
@@ -93,9 +93,9 @@
|
|||||||
|
|
||||||
- name: Ensure matrix-appservice-irc repository is present when self-building
|
- name: Ensure matrix-appservice-irc repository is present when self-building
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_appservice_irc_docker_repo }}"
|
repo: "{{ matrix_appservice_irc_container_repo }}"
|
||||||
version: "{{ matrix_appservice_irc_docker_repo_version }}"
|
version: "{{ matrix_appservice_irc_container_repo_version }}"
|
||||||
dest: "{{ matrix_appservice_irc_docker_src_files_path }}"
|
dest: "{{ matrix_appservice_irc_container_src_files_path }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
@@ -104,13 +104,13 @@
|
|||||||
|
|
||||||
- name: Ensure matrix-appservice-irc Docker image is built
|
- name: Ensure matrix-appservice-irc Docker image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_irc_docker_image }}"
|
name: "{{ matrix_appservice_irc_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_appservice_irc_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_irc_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_appservice_irc_git_pull_results.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_irc_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_appservice_irc_docker_src_files_path }}"
|
path: "{{ matrix_appservice_irc_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_appservice_irc_enabled | bool and matrix_appservice_irc_container_image_self_build | bool and matrix_appservice_irc_git_pull_results.changed"
|
when: "matrix_appservice_irc_enabled | bool and matrix_appservice_irc_container_image_self_build | bool and matrix_appservice_irc_git_pull_results.changed"
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_irc_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_irc_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_irc_config_path }}/config.yaml"
|
dest: "{{ matrix_appservice_irc_config_path }}/config.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_irc_config_result
|
register: matrix_appservice_irc_config_result
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/labels.j2"
|
src: "{{ role_path }}/templates/labels.j2"
|
||||||
dest: "{{ matrix_appservice_irc_base_path }}/labels"
|
dest: "{{ matrix_appservice_irc_base_path }}/labels"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_irc_labels_result
|
register: matrix_appservice_irc_labels_result
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
- name: Generate IRC appservice signing key for authenticated media
|
- name: Generate IRC appservice signing key for authenticated media
|
||||||
community.docker.docker_container:
|
community.docker.docker_container:
|
||||||
name: "create-auth-media-jwk-key"
|
name: "create-auth-media-jwk-key"
|
||||||
image: "{{ matrix_appservice_irc_docker_image }}"
|
image: "{{ matrix_appservice_irc_container_image }}"
|
||||||
cleanup: true
|
cleanup: true
|
||||||
network_mode: none
|
network_mode: none
|
||||||
entrypoint: "/usr/local/bin/node"
|
entrypoint: "/usr/local/bin/node"
|
||||||
@@ -179,7 +179,7 @@
|
|||||||
- name: (Migration) Ensure Appservice IRC passkey permissions are okay
|
- name: (Migration) Ensure Appservice IRC passkey permissions are okay
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ matrix_appservice_irc_data_path }}/passkey.pem"
|
path: "{{ matrix_appservice_irc_data_path }}/passkey.pem"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
--mount type=bind,src={{ matrix_appservice_irc_config_path }},dst=/config
|
--mount type=bind,src={{ matrix_appservice_irc_config_path }},dst=/config
|
||||||
--mount type=bind,src={{ matrix_appservice_irc_data_path }},dst=/data
|
--mount type=bind,src={{ matrix_appservice_irc_data_path }},dst=/data
|
||||||
--entrypoint=/bin/bash
|
--entrypoint=/bin/bash
|
||||||
{{ matrix_appservice_irc_docker_image }}
|
{{ matrix_appservice_irc_container_image }}
|
||||||
-c
|
-c
|
||||||
'node app.js
|
'node app.js
|
||||||
-r
|
-r
|
||||||
@@ -243,7 +243,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_irc_registration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_irc_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_irc_config_path }}/registration.yaml"
|
dest: "{{ matrix_appservice_irc_config_path }}/registration.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_irc_registration_result
|
register: matrix_appservice_irc_registration_result
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-appservice-irc.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-appservice-irc.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_appservice_irc_systemd_service_result
|
register: matrix_appservice_irc_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether matrix-appservice-irc needs a restart
|
- name: Determine whether matrix-appservice-irc needs a restart
|
||||||
|
|||||||
@@ -6,6 +6,27 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: (Deprecation) Catch and report renamed appservice-irc variables
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
Your configuration contains a variable, which now has a different name.
|
||||||
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
|
with_items:
|
||||||
|
- {'old': 'matrix_appservice_irc_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_irc_container_http_host_bind_port>'}
|
||||||
|
- {'old': 'matrix_appservice_irc_container_self_build', 'new': 'matrix_appservice_irc_container_image_self_build'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_image_name_prefix', 'new': 'matrix_appservice_irc_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_irc_homeserver_media_url', 'new': '<removed; media proxying now uses matrix_appservice_irc_ircService_mediaProxy_publicUrl>'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_image', 'new': 'matrix_appservice_irc_container_image'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_image_force_pull', 'new': 'matrix_appservice_irc_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_image_registry_prefix', 'new': 'matrix_appservice_irc_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_image_registry_prefix_upstream', 'new': 'matrix_appservice_irc_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_image_registry_prefix_upstream_default', 'new': 'matrix_appservice_irc_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_image_tag', 'new': 'matrix_appservice_irc_container_image_tag'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_repo', 'new': 'matrix_appservice_irc_container_repo'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_repo_version', 'new': 'matrix_appservice_irc_container_repo_version'}
|
||||||
|
- {'old': 'matrix_appservice_irc_docker_src_files_path', 'new': 'matrix_appservice_irc_container_src_files_path'}
|
||||||
|
|
||||||
- name: Fail if required appservice-irc settings not defined
|
- name: Fail if required appservice-irc settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -25,6 +46,7 @@
|
|||||||
# we'd fail generating the registration.yaml file with a non-helpful error.
|
# we'd fail generating the registration.yaml file with a non-helpful error.
|
||||||
#
|
#
|
||||||
# This is a safety check to ensure we fail earlier and in a nicer way.
|
# This is a safety check to ensure we fail earlier and in a nicer way.
|
||||||
|
|
||||||
- name: Fail if no additional configuration provided
|
- name: Fail if no additional configuration provided
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -34,18 +56,6 @@
|
|||||||
Overriding the whole bridge's configuration (`matrix_appservice_irc_configuration`) is yet another possibility.
|
Overriding the whole bridge's configuration (`matrix_appservice_irc_configuration`) is yet another possibility.
|
||||||
when: "matrix_appservice_irc_configuration.ircService.servers | length == 0"
|
when: "matrix_appservice_irc_configuration.ircService.servers | length == 0"
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed appservice-irc variables
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-
|
|
||||||
Your configuration contains a variable, which now has a different name.
|
|
||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
|
||||||
with_items:
|
|
||||||
- {'old': 'matrix_appservice_irc_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_irc_container_http_host_bind_port>'}
|
|
||||||
- {'old': 'matrix_appservice_irc_container_self_build', 'new': 'matrix_appservice_irc_container_image_self_build'}
|
|
||||||
- {'old': 'matrix_appservice_irc_docker_image_name_prefix', 'new': 'matrix_appservice_irc_docker_image_registry_prefix'}
|
|
||||||
- {'old': 'matrix_appservice_irc_homeserver_media_url', 'new': '<removed; media proxying now uses matrix_appservice_irc_ircService_mediaProxy_publicUrl>'}
|
|
||||||
|
|
||||||
- name: Fail if matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix does not start with a slash
|
- name: Fail if matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix does not start with a slash
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
--entrypoint=/bin/bash \
|
--entrypoint=/bin/bash \
|
||||||
{{ matrix_appservice_irc_docker_image }} \
|
{{ matrix_appservice_irc_container_image }} \
|
||||||
-c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999'
|
-c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999'
|
||||||
|
|
||||||
{% for network in matrix_appservice_irc_container_additional_networks %}
|
{% for network in matrix_appservice_irc_container_additional_networks %}
|
||||||
|
|||||||
@@ -35,23 +35,23 @@ matrix_appservice_kakaotalk_container_image_self_build_repo: "https://src.miscwo
|
|||||||
matrix_appservice_kakaotalk_container_image_self_build_repo_version: "{{ 'master' if matrix_appservice_kakaotalk_version == 'latest' else matrix_appservice_kakaotalk_version }}"
|
matrix_appservice_kakaotalk_container_image_self_build_repo_version: "{{ 'master' if matrix_appservice_kakaotalk_version == 'latest' else matrix_appservice_kakaotalk_version }}"
|
||||||
|
|
||||||
matrix_appservice_kakaotalk_node_version: "{{ matrix_appservice_kakaotalk_version }}"
|
matrix_appservice_kakaotalk_node_version: "{{ matrix_appservice_kakaotalk_version }}"
|
||||||
matrix_appservice_kakaotalk_node_docker_image: "{{ matrix_appservice_kakaotalk_node_docker_image_registry_prefix }}fair/matrix-appservice-kakaotalk-node:{{ matrix_appservice_kakaotalk_node_version }}"
|
matrix_appservice_kakaotalk_node_container_image: "{{ matrix_appservice_kakaotalk_node_container_image_registry_prefix }}fair/matrix-appservice-kakaotalk-node:{{ matrix_appservice_kakaotalk_node_version }}"
|
||||||
matrix_appservice_kakaotalk_node_docker_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_kakaotalk_container_image_self_build else matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream }}"
|
matrix_appservice_kakaotalk_node_container_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_kakaotalk_container_image_self_build else matrix_appservice_kakaotalk_node_container_image_registry_prefix_upstream }}"
|
||||||
matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream: "{{ matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream_default }}"
|
matrix_appservice_kakaotalk_node_container_image_registry_prefix_upstream: "{{ matrix_appservice_kakaotalk_node_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream_default: ""
|
matrix_appservice_kakaotalk_node_container_image_registry_prefix_upstream_default: ""
|
||||||
matrix_appservice_kakaotalk_node_docker_image_force_pull: "{{ matrix_appservice_kakaotalk_node_docker_image.endswith(':latest') }}"
|
matrix_appservice_kakaotalk_node_container_image_force_pull: "{{ matrix_appservice_kakaotalk_node_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_appservice_kakaotalk_version: 86c038fd2ffee5e0aebf65136f085cce7e38b54e
|
matrix_appservice_kakaotalk_version: 86c038fd2ffee5e0aebf65136f085cce7e38b54e
|
||||||
matrix_appservice_kakaotalk_docker_image: "{{ matrix_appservice_kakaotalk_docker_image_registry_prefix }}fair/matrix-appservice-kakaotalk:{{ matrix_appservice_kakaotalk_version }}"
|
matrix_appservice_kakaotalk_container_image: "{{ matrix_appservice_kakaotalk_container_image_registry_prefix }}fair/matrix-appservice-kakaotalk:{{ matrix_appservice_kakaotalk_version }}"
|
||||||
matrix_appservice_kakaotalk_docker_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_kakaotalk_container_image_self_build else matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream }}"
|
matrix_appservice_kakaotalk_container_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_kakaotalk_container_image_self_build else matrix_appservice_kakaotalk_container_image_registry_prefix_upstream }}"
|
||||||
matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream: "{{ matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream_default }}"
|
matrix_appservice_kakaotalk_container_image_registry_prefix_upstream: "{{ matrix_appservice_kakaotalk_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream_default: ""
|
matrix_appservice_kakaotalk_container_image_registry_prefix_upstream_default: ""
|
||||||
matrix_appservice_kakaotalk_docker_image_force_pull: "{{ matrix_appservice_kakaotalk_docker_image.endswith(':latest') }}"
|
matrix_appservice_kakaotalk_container_image_force_pull: "{{ matrix_appservice_kakaotalk_container_image.endswith(':latest') }}"
|
||||||
|
|
||||||
matrix_appservice_kakaotalk_base_path: "{{ matrix_base_data_path }}/appservice-kakaotalk"
|
matrix_appservice_kakaotalk_base_path: "{{ matrix_base_data_path }}/appservice-kakaotalk"
|
||||||
matrix_appservice_kakaotalk_config_path: "{{ matrix_appservice_kakaotalk_base_path }}/config"
|
matrix_appservice_kakaotalk_config_path: "{{ matrix_appservice_kakaotalk_base_path }}/config"
|
||||||
matrix_appservice_kakaotalk_data_path: "{{ matrix_appservice_kakaotalk_base_path }}/data"
|
matrix_appservice_kakaotalk_data_path: "{{ matrix_appservice_kakaotalk_base_path }}/data"
|
||||||
matrix_appservice_kakaotalk_docker_src_files_path: "{{ matrix_appservice_kakaotalk_base_path }}/docker-src"
|
matrix_appservice_kakaotalk_container_src_files_path: "{{ matrix_appservice_kakaotalk_base_path }}/docker-src"
|
||||||
|
|
||||||
matrix_appservice_kakaotalk_command_prefix: "!kt"
|
matrix_appservice_kakaotalk_command_prefix: "!kt"
|
||||||
|
|
||||||
@@ -225,3 +225,13 @@ matrix_appservice_kakaotalk_registration_yaml: |
|
|||||||
rate_limited: false
|
rate_limited: false
|
||||||
|
|
||||||
matrix_appservice_kakaotalk_registration: "{{ matrix_appservice_kakaotalk_registration_yaml | from_yaml }}"
|
matrix_appservice_kakaotalk_registration: "{{ matrix_appservice_kakaotalk_registration_yaml | from_yaml }}"
|
||||||
|
|
||||||
|
# matrix_appservice_kakaotalk_restart_necessary controls whether the service
|
||||||
|
# will be restarted (when true) or merely started (when false) by the
|
||||||
|
# systemd service manager role (when conditional restart is enabled).
|
||||||
|
#
|
||||||
|
# This value is automatically computed during installation based on whether
|
||||||
|
# any configuration files, the systemd service file, or the container image changed.
|
||||||
|
# The default of `false` means "no restart needed" — appropriate when the role's
|
||||||
|
# installation tasks haven't run (e.g., due to --tags skipping them).
|
||||||
|
matrix_appservice_kakaotalk_restart_necessary: false
|
||||||
|
|||||||
@@ -8,46 +8,46 @@
|
|||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk image is pulled
|
- name: Ensure matrix-appservice-kakaotalk image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_kakaotalk_docker_image }}"
|
name: "{{ matrix_appservice_kakaotalk_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_appservice_kakaotalk_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_kakaotalk_container_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_appservice_kakaotalk_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_kakaotalk_container_image_force_pull }}"
|
||||||
when: not matrix_appservice_kakaotalk_container_image_self_build
|
when: not matrix_appservice_kakaotalk_container_image_self_build
|
||||||
register: result
|
register: matrix_appservice_kakaotalk_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||||
until: result is not failed
|
until: matrix_appservice_kakaotalk_container_image_pull_result is not failed
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk-node image is pulled
|
- name: Ensure matrix-appservice-kakaotalk-node image is pulled
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_kakaotalk_node_docker_image }}"
|
name: "{{ matrix_appservice_kakaotalk_node_container_image }}"
|
||||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||||
force_source: "{{ matrix_appservice_kakaotalk_node_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_kakaotalk_node_container_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_appservice_kakaotalk_node_docker_image_force_pull }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_kakaotalk_node_container_image_force_pull }}"
|
||||||
when: not matrix_appservice_kakaotalk_container_image_self_build
|
when: not matrix_appservice_kakaotalk_container_image_self_build
|
||||||
register: result
|
register: matrix_appservice_kakaotalk_node_container_image_pull_result
|
||||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||||
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
delay: "{{ devture_playbook_help_container_retries_delay }}"
|
||||||
until: result is not failed
|
until: matrix_appservice_kakaotalk_node_container_image_pull_result is not failed
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk paths exist
|
- name: Ensure matrix-appservice-kakaotalk paths exist
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.path }}"
|
path: "{{ item.path }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0750
|
mode: '0750'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_appservice_kakaotalk_base_path }}", when: true}
|
- {path: "{{ matrix_appservice_kakaotalk_base_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_kakaotalk_config_path }}", when: true}
|
- {path: "{{ matrix_appservice_kakaotalk_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_kakaotalk_data_path }}", when: true}
|
- {path: "{{ matrix_appservice_kakaotalk_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_kakaotalk_docker_src_files_path }}", when: "{{ matrix_appservice_kakaotalk_container_image_self_build }}"}
|
- {path: "{{ matrix_appservice_kakaotalk_container_src_files_path }}", when: "{{ matrix_appservice_kakaotalk_container_image_self_build }}"}
|
||||||
when: item.when | bool
|
when: item.when | bool
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk repository is present on self-build
|
- name: Ensure matrix-appservice-kakaotalk repository is present on self-build
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_appservice_kakaotalk_container_image_self_build_repo }}"
|
repo: "{{ matrix_appservice_kakaotalk_container_image_self_build_repo }}"
|
||||||
dest: "{{ matrix_appservice_kakaotalk_docker_src_files_path }}"
|
dest: "{{ matrix_appservice_kakaotalk_container_src_files_path }}"
|
||||||
version: "{{ matrix_appservice_kakaotalk_container_image_self_build_repo_version }}"
|
version: "{{ matrix_appservice_kakaotalk_container_image_self_build_repo_version }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
@@ -57,25 +57,25 @@
|
|||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk-node Docker image is built
|
- name: Ensure matrix-appservice-kakaotalk-node Docker image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_kakaotalk_node_docker_image }}"
|
name: "{{ matrix_appservice_kakaotalk_node_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_appservice_kakaotalk_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_kakaotalk_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_appservice_kakaotalk_git_pull_results.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_kakaotalk_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_appservice_kakaotalk_docker_src_files_path }}/node"
|
path: "{{ matrix_appservice_kakaotalk_container_src_files_path }}/node"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_appservice_kakaotalk_container_image_self_build | bool"
|
when: "matrix_appservice_kakaotalk_container_image_self_build | bool"
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk Docker image is built
|
- name: Ensure matrix-appservice-kakaotalk Docker image is built
|
||||||
community.docker.docker_image:
|
community.docker.docker_image:
|
||||||
name: "{{ matrix_appservice_kakaotalk_docker_image }}"
|
name: "{{ matrix_appservice_kakaotalk_container_image }}"
|
||||||
source: build
|
source: build
|
||||||
force_source: "{{ matrix_appservice_kakaotalk_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
|
force_source: "{{ matrix_appservice_kakaotalk_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_appservice_kakaotalk_git_pull_results.changed }}"
|
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_kakaotalk_git_pull_results.changed }}"
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_appservice_kakaotalk_docker_src_files_path }}"
|
path: "{{ matrix_appservice_kakaotalk_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
when: "matrix_appservice_kakaotalk_container_image_self_build | bool"
|
when: "matrix_appservice_kakaotalk_container_image_self_build | bool"
|
||||||
|
|
||||||
@@ -83,25 +83,28 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_kakaotalk_node_configuration | to_nice_json }}"
|
content: "{{ matrix_appservice_kakaotalk_node_configuration | to_nice_json }}"
|
||||||
dest: "{{ matrix_appservice_kakaotalk_config_path }}/node-config.json"
|
dest: "{{ matrix_appservice_kakaotalk_config_path }}/node-config.json"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
|
register: matrix_appservice_kakaotalk_node_config_result
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk config.yaml installed
|
- name: Ensure matrix-appservice-kakaotalk config.yaml installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_kakaotalk_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_kakaotalk_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_kakaotalk_config_path }}/config.yaml"
|
dest: "{{ matrix_appservice_kakaotalk_config_path }}/config.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
|
register: matrix_appservice_kakaotalk_config_result
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk registration.yaml installed
|
- name: Ensure matrix-appservice-kakaotalk registration.yaml installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_kakaotalk_registration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_appservice_kakaotalk_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_kakaotalk_config_path }}/registration.yaml"
|
dest: "{{ matrix_appservice_kakaotalk_config_path }}/registration.yaml"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
|
register: matrix_appservice_kakaotalk_registration_result
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk container network is created
|
- name: Ensure matrix-appservice-kakaotalk container network is created
|
||||||
community.general.docker_network:
|
community.general.docker_network:
|
||||||
@@ -114,11 +117,25 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk-node.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk-node.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
register: matrix_appservice_kakaotalk_node_systemd_service_result
|
register: matrix_appservice_kakaotalk_node_systemd_service_result
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-kakaotalk.service installed
|
- name: Ensure matrix-appservice-kakaotalk.service installed
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service"
|
||||||
mode: 0644
|
mode: '0644'
|
||||||
|
register: matrix_appservice_kakaotalk_systemd_service_result
|
||||||
|
|
||||||
|
- name: Determine whether matrix-appservice-kakaotalk needs a restart
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
matrix_appservice_kakaotalk_restart_necessary: >-
|
||||||
|
{{
|
||||||
|
matrix_appservice_kakaotalk_node_config_result.changed | default(false)
|
||||||
|
or matrix_appservice_kakaotalk_config_result.changed | default(false)
|
||||||
|
or matrix_appservice_kakaotalk_registration_result.changed | default(false)
|
||||||
|
or matrix_appservice_kakaotalk_node_systemd_service_result.changed | default(false)
|
||||||
|
or matrix_appservice_kakaotalk_systemd_service_result.changed | default(false)
|
||||||
|
or matrix_appservice_kakaotalk_container_image_pull_result.changed | default(false)
|
||||||
|
or matrix_appservice_kakaotalk_node_container_image_pull_result.changed | default(false)
|
||||||
|
}}
|
||||||
|
|||||||
@@ -5,6 +5,27 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- name: (Deprecation) Catch and report renamed appservice-kakaotalk variables
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: >-
|
||||||
|
Your configuration contains a variable, which now has a different name.
|
||||||
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
|
with_items:
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_node_docker_image_name_prefix', 'new': 'matrix_appservice_kakaotalk_node_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_docker_image_name_prefix', 'new': 'matrix_appservice_kakaotalk_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_docker_image', 'new': 'matrix_appservice_kakaotalk_container_image'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_docker_image_force_pull', 'new': 'matrix_appservice_kakaotalk_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_docker_image_registry_prefix', 'new': 'matrix_appservice_kakaotalk_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream', 'new': 'matrix_appservice_kakaotalk_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream_default', 'new': 'matrix_appservice_kakaotalk_container_image_registry_prefix_upstream_default'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_docker_src_files_path', 'new': 'matrix_appservice_kakaotalk_container_src_files_path'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_node_docker_image', 'new': 'matrix_appservice_kakaotalk_node_container_image'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_node_docker_image_force_pull', 'new': 'matrix_appservice_kakaotalk_node_container_image_force_pull'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_node_docker_image_registry_prefix', 'new': 'matrix_appservice_kakaotalk_node_container_image_registry_prefix'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream', 'new': 'matrix_appservice_kakaotalk_node_container_image_registry_prefix_upstream'}
|
||||||
|
- {'old': 'matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream_default', 'new': 'matrix_appservice_kakaotalk_node_container_image_registry_prefix_upstream_default'}
|
||||||
|
|
||||||
- name: Fail if required appservice-kakaotalk settings not defined
|
- name: Fail if required appservice-kakaotalk settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
@@ -16,13 +37,3 @@
|
|||||||
- {'name': 'matrix_appservice_kakaotalk_homeserver_token', when: true}
|
- {'name': 'matrix_appservice_kakaotalk_homeserver_token', when: true}
|
||||||
- {'name': 'matrix_appservice_kakaotalk_database_hostname', when: "{{ matrix_appservice_kakaotalk_database_engine == 'postgres' }}"}
|
- {'name': 'matrix_appservice_kakaotalk_database_hostname', when: "{{ matrix_appservice_kakaotalk_database_engine == 'postgres' }}"}
|
||||||
- {'name': 'matrix_appservice_kakaotalk_container_network', when: true}
|
- {'name': 'matrix_appservice_kakaotalk_container_network', when: true}
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed appservice-kakaotalk variables
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-
|
|
||||||
Your configuration contains a variable, which now has a different name.
|
|
||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
|
||||||
with_items:
|
|
||||||
- {'old': 'matrix_appservice_kakaotalk_node_docker_image_name_prefix', 'new': 'matrix_appservice_kakaotalk_node_docker_image_registry_prefix'}
|
|
||||||
- {'old': 'matrix_appservice_kakaotalk_docker_image_name_prefix', 'new': 'matrix_appservice_kakaotalk_docker_image_registry_prefix'}
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user