Compare commits
29 Commits
da7d2361a9
...
fc9a6f9632
Author | SHA1 | Date | |
---|---|---|---|
fc9a6f9632 | |||
4a60b6269d | |||
5def65858c | |||
636ccef828 | |||
e133c19d66 | |||
|
d2941b56b2 | ||
|
1ee118bd49 | ||
|
f581867049 | ||
|
4f1f3555f2 | ||
|
e41fcf2746 | ||
|
3f50c08828 | ||
|
cbb924dec7 | ||
|
e3907b369a | ||
|
4d08e935a2 | ||
|
1163e9880f | ||
|
2f33b330ff | ||
|
49da9c76ac | ||
|
8014979ddb | ||
|
4a0b839768 | ||
|
c92af9fe89 | ||
|
85e0906f8a | ||
|
d7d5ea3b91 | ||
|
47e5bab784 | ||
|
c83c70ac35 | ||
|
2d21a70b3e | ||
|
b720b15de6 | ||
|
5ae93fbf2b | ||
|
290754371a | ||
|
68424e68e5 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,7 +1,3 @@
|
||||
/inventory/*
|
||||
!/inventory/.gitkeep
|
||||
!/inventory/host_vars/.gitkeep
|
||||
!/inventory/scripts
|
||||
/roles/*/files/scratchpad
|
||||
.DS_Store
|
||||
.python-version
|
||||
|
@ -1,3 +1,12 @@
|
||||
# 2022-04-25
|
||||
|
||||
## buscarron bot support
|
||||
|
||||
Thanks to [Aine](https://gitlab.com/etke.cc) of [etke.cc](https://etke.cc/), the playbook can now set up [the Buscarron bot](https://gitlab.com/etke.cc/buscarron). It's a bot you can use to send any form (HTTP POST, HTML) to a (encrypted) Matrix room
|
||||
|
||||
See our [Setting up Buscarron](docs/configuring-playbook-bot-buscarron.md) documentation to get started.
|
||||
|
||||
|
||||
# 2022-04-21
|
||||
|
||||
## matrix-registration-bot support
|
||||
|
@ -123,6 +123,8 @@ Using this playbook, you can get the following services configured on your serve
|
||||
|
||||
- (optional) the [Borg](https://borgbackup.org) backup - see [docs/configuring-playbook-backup-borg.md](docs/configuring-playbook-backup-borg.md) for setup documentation
|
||||
|
||||
- (optional) the [Buscarron](https://gitlab.com/etke.cc/buscarron) bot - see [docs/configuring-playbook-bot-buscarron.md](docs/configuring-playbook-bot-buscarron.md) for setup documentation
|
||||
|
||||
Basically, this playbook aims to get you up-and-running with all the necessities around Matrix, without you having to do anything else.
|
||||
|
||||
**Note**: the list above is exhaustive. It includes optional or even some advanced components that you will most likely not need.
|
||||
|
@ -1,6 +1,11 @@
|
||||
[defaults]
|
||||
|
||||
vault_password_file = gpg/open_vault.sh
|
||||
|
||||
retry_files_enabled = False
|
||||
stdout_callback = yaml
|
||||
|
||||
inventory = inventory/hosts
|
||||
|
||||
[connection]
|
||||
pipelining = True
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
As stated in the [Prerequisites](prerequisites.md), currently only `x86_64` is fully supported. However, it is possible to set the target architecture, and some tools can be built on the host or other measures can be used.
|
||||
|
||||
To that end add the following variable to your `vars.yaml` file:
|
||||
To that end add the following variable to your `vars.yml` file (see [Configuring playbook](configuring-playbook.md)):
|
||||
|
||||
```yaml
|
||||
matrix_architecture: <your-matrix-server-architecture>
|
||||
@ -13,7 +13,7 @@ Currently supported architectures are the following:
|
||||
- `arm64`
|
||||
- `arm32`
|
||||
|
||||
so for the Raspberry Pi, the following should be in your `vars.yaml` file:
|
||||
so for the Raspberry Pi, the following should be in your `vars.yml` file:
|
||||
|
||||
```yaml
|
||||
matrix_architecture: "arm32"
|
||||
|
@ -38,6 +38,7 @@ If you are using Cloudflare DNS, make sure to disable the proxy and set all reco
|
||||
| CNAME | `sygnal` | - | - | - | `matrix.<your-domain>` |
|
||||
| CNAME | `hydrogen` | - | - | - | `matrix.<your-domain>` |
|
||||
| CNAME | `cinny` | - | - | - | `matrix.<your-domain>` |
|
||||
| CNAME | `buscarron` | - | - | - | `matrix.<your-domain>` |
|
||||
|
||||
## Subdomains setup
|
||||
|
||||
@ -60,6 +61,8 @@ The `hydrogen.<your-domain>` subdomain may be necessary, because this playbook c
|
||||
|
||||
The `cinny.<your-domain>` subdomain may be necessary, because this playbook could install the [Cinny](https://github.com/ajbura/cinny) web client. The installation of cinny is disabled by default, it is not a core required component. To learn how to install it, see our [configuring cinny guide](configuring-playbook-client-cinny.md). If you do not wish to set up cinny, feel free to skip the `cinny.<your-domain>` DNS record.
|
||||
|
||||
The `buscarron.<your-domain>` subdomain may be necessary, because this playbook could install the [buscarron](https://github.com/etke.cc/buscarron) bot. The installation of buscarron is disabled by default, it is not a core required component. To learn how to install it, see our [configuring buscarron guide](configuring-playbook-bot-buscarron.md). If you do not wish to set up buscarron, feel free to skip the `buscarron.<your-domain>` DNS record.
|
||||
|
||||
## `_matrix-identity._tcp` SRV record setup
|
||||
|
||||
To make the [ma1sd](https://github.com/ma1uta/ma1sd) Identity Server (which this playbook may optionally install for you) enable its federation features, set up an SRV record that looks like this:
|
||||
|
75
docs/configuring-playbook-bot-buscarron.md
Normal file
75
docs/configuring-playbook-bot-buscarron.md
Normal file
@ -0,0 +1,75 @@
|
||||
# Setting up Buscarron (optional)
|
||||
|
||||
The playbook can install and configure [buscarron](https://gitlab.com/etke.cc/buscarron) for you.
|
||||
|
||||
It's a bot you can use to setup **your own helpdesk on matrix**
|
||||
It's a bot you can use to send any form (HTTP POST, HTML) to a (encrypted) matrix room
|
||||
|
||||
## Registering the bot user
|
||||
|
||||
By default, the playbook will set up the bot with a username like this: `@bot.buscarron:DOMAIN`.
|
||||
|
||||
(to use a different username, adjust the `matrix_bot_buscarron_login` variable).
|
||||
|
||||
You **need to register the bot user manually** before setting up the bot. You can use the playbook to [register a new user](registering-users.md):
|
||||
|
||||
```
|
||||
ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=bot.buscarron password=PASSWORD_FOR_THE_BOT admin=no' --tags=register-user
|
||||
```
|
||||
|
||||
Choose a strong password for the bot. You can generate a good password with a command like this: `pwgen -s 64 1`.
|
||||
|
||||
|
||||
## Adjusting the playbook configuration
|
||||
|
||||
Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file:
|
||||
|
||||
```yaml
|
||||
matrix_bot_buscarron_enabled: true
|
||||
|
||||
# Adjust this to whatever password you chose when registering the bot user
|
||||
matrix_bot_buscarron_password: PASSWORD_FOR_THE_BOT
|
||||
|
||||
# Adjust accepted forms
|
||||
matrix_bot_buscarron_forms:
|
||||
- name: contact # (mandatory) Your form name, will be used as endpoint, eg: buscarron.DOMAIN/contact
|
||||
room: "!yourRoomID:DOMAIN" # (mandatory) Room ID where form submission will be posted
|
||||
redirect: https://DOMAIN # (mandatory) To what page user will be redirected after the form submission
|
||||
ratelimit: 1r/m # (optional) rate limit of the form, format: <max requests>r/<interval:s,m>, eg: 1r/s or 54r/m
|
||||
extensions: [] # (optional) list of form extensions (not used yet)
|
||||
|
||||
matrix_bot_buscarron_spam_hosts: [] # (optional) list of email domains/hosts that should be rejected automatically
|
||||
matrix_bot_buscarron_spam_emails: [] # (optional) list of email addresses that should be rejected automatically
|
||||
```
|
||||
|
||||
You will also need to add a DNS record so that buscarron can be accessed.
|
||||
By default buscarron will use https://buscarron.DOMAIN so you will need to create an CNAME record for `buscarron`.
|
||||
See [Configuring DNS](configuring-dns.md).
|
||||
|
||||
If you would like to use a different domain, add the following to your configuration file (changing it to use your preferred domain):
|
||||
|
||||
```yaml
|
||||
matrix_server_fqn_buscarron: "form.{{ matrix_domain }}"
|
||||
```
|
||||
|
||||
|
||||
## Installing
|
||||
|
||||
After configuring the playbook, run the [installation](installing.md) command again:
|
||||
|
||||
```
|
||||
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
To use the bot, invite the `@bot.buscarron:DOMAIN` to the room you specified in a config, after that any point your form to the form url, example for the `contact` form:
|
||||
|
||||
```html
|
||||
<form method="POST" action="https://buscarron.DOMAIN/contact">
|
||||
<!--your fields-->
|
||||
</form>
|
||||
```
|
||||
|
||||
You can also refer to the upstream [documentation](https://gitlab.com/etke.cc/buscarron).
|
@ -145,13 +145,16 @@ When you're done with all the configuration you'd like to do, continue with [Ins
|
||||
|
||||
- [Setting up matrix-reminder-bot](configuring-playbook-bot-matrix-reminder-bot.md) - a bot to remind you about stuff (optional)
|
||||
|
||||
- [Setting up matrix-registration-bot](configuring-playbook-bot-matrix-registration-bot.md) - a bot to create and manage registration tokens to invite users (optional)
|
||||
|
||||
- [Setting up honoroit](configuring-playbook-bot-honoroit.md) - a helpdesk bot (optional)
|
||||
|
||||
- [Setting up Go-NEB](configuring-playbook-bot-go-neb.md) - an extensible multifunctional bot (optional)
|
||||
|
||||
- [Setting up Mjolnir](configuring-playbook-bot-mjolnir.md) - a moderation tool/bot (optional)
|
||||
|
||||
- [Setting up matrix-registration-bot](configuring-playbook-bot-matrix-registration-bot.md) - a bot to create and manage registration tokens to invite users (optional)
|
||||
- [Setting up Buscarron](configuring-playbook-bot-buscarron.md) - a bot you can use to send any form (HTTP POST, HTML) to a (encrypted) Matrix room (optional)
|
||||
|
||||
|
||||
### Backups
|
||||
|
||||
|
5
gpg/open_vault.sh
Executable file
5
gpg/open_vault.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
|
||||
gpg2 --batch --use-agent --decrypt $(dirname $0)/vault_passphrase.gpg 2>/dev/null
|
18
gpg/vault_passphrase.gpg
Normal file
18
gpg/vault_passphrase.gpg
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMAxEs7W/4x4lxARAAssinIzR2rGs+Qkm0Q2tRdSXSXRx3OhH+2T5p0Rz3YkqU
|
||||
iyiUtyT/Ll7RMUAlAEDZITvirXe4ZZImDcxQegEzFgO7BowQYJDRdhaRmLKZpiuQ
|
||||
foRnJAAR12sf49arjJjaBQb91ViOp5MkxAtXiiqWyXwSSII+cV88flMq143cFmfC
|
||||
C5OdIQd3SqrbFhGRTjUzoIMqnJH8xksjwph9GS811dY14rQv5X1Ybt5zehMJ7/m/
|
||||
luLNg2zgQgYOUxcovddCVMI54ThXyDubDox/5xLvVjyVOFHgwC/VLn+QXHuPY/r5
|
||||
+rVzz/30eq0uOLKD3LnDBQskCWRVWGC2ulKaZtlylBq6KRzIM6c6+VPSHCjoFyES
|
||||
RRpRHeIXGLs31eLkr8dc+VNbPKpMsjm/E/4ZVE2JBpy7S/kh1XYVQxT6ahDKT1tD
|
||||
4YN9O0JyNXzjiyNaTTLwNGh5+ICEd3ZCfa4O/og2LySGPOw6mX8ukgP029LHVp6+
|
||||
0tRwSWiIM3US/NIVGA+o9e9I/I5Bp/cnzJgd7faUIlzcVPP+euCbo4GsYWpX3Nca
|
||||
eRcr7AVY3wwuZtl7/s8KbQKk0ulLxS4Lo2XmdpQl8CPGwASdbMf/H8B256+xiUQ3
|
||||
ml400ZaCC7Loeduwl1ez1H/dFFzmpUziaxxtWW4aFtOUYhGeSCTu6ZIgxVq3eBnS
|
||||
jAGv8bt+0Xnrpih3mZWM92cw2VKfzYD9WG+dCB4DtZMKhl1ub2bkeTC/B9F+QuP6
|
||||
anlonYHs2wmPXzjcx8ajonbYrYXanoNRHDId6OqVAbjYqbua6TG6H9LUFweIj1RV
|
||||
yhUPejzhA8xEB0nUcKJZKLvuqvwPbr06GODnAKY5TQ4yILMAnBx0pNzfQNzo
|
||||
=Cecg
|
||||
-----END PGP MESSAGE-----
|
@ -458,7 +458,7 @@ matrix_mautrix_signal_database_engine: 'postgres'
|
||||
matrix_mautrix_signal_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.signal.db') | to_uuid }}"
|
||||
|
||||
matrix_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
|
||||
matrix_mautrix_signal_daemon_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
|
||||
matrix_mautrix_signal_daemon_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
|
||||
|
||||
######################################################################
|
||||
#
|
||||
@ -533,14 +533,14 @@ matrix_mautrix_twitter_systemd_required_services_list: |
|
||||
(['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
|
||||
}}
|
||||
|
||||
matrix_mautrix_twitter_appservice_token: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'twt.as.token') | to_uuid }}"
|
||||
matrix_mautrix_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.as.token') | to_uuid }}"
|
||||
|
||||
matrix_mautrix_twitter_homeserver_token: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'twt.hs.token') | to_uuid }}"
|
||||
matrix_mautrix_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.hs.token') | to_uuid }}"
|
||||
|
||||
matrix_mautrix_twitter_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
|
||||
|
||||
matrix_mautrix_twitter_database_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
|
||||
matrix_mautrix_twitter_database_password: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'mau.twt.db') | to_uuid if matrix_postgres_enabled else '' }}"
|
||||
matrix_mautrix_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.twt.db') | to_uuid if matrix_postgres_enabled else '' }}"
|
||||
|
||||
######################################################################
|
||||
#
|
||||
@ -1047,6 +1047,37 @@ matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in [
|
||||
#
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# matrix-bot-buscarron
|
||||
#
|
||||
######################################################################
|
||||
|
||||
# We don't enable bots by default.
|
||||
matrix_bot_buscarron_enabled: false
|
||||
|
||||
matrix_bot_buscarron_systemd_required_services_list: |
|
||||
{{
|
||||
['docker.service']
|
||||
+
|
||||
(['matrix-postgres.service'] if matrix_postgres_enabled else [])
|
||||
+
|
||||
(['matrix-synapse.service'] if matrix_synapse_enabled else [])
|
||||
+
|
||||
(['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
|
||||
}}
|
||||
|
||||
# Postgres is the default, except if not using `matrix_postgres` (internal postgres)
|
||||
matrix_bot_buscarron_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
|
||||
matrix_bot_buscarron_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'buscarron.bot.db') | to_uuid }}"
|
||||
matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# /matrix-bot-buscarron
|
||||
#
|
||||
######################################################################
|
||||
|
||||
|
||||
######################################################################
|
||||
#
|
||||
@ -1472,6 +1503,7 @@ matrix_nginx_proxy_proxy_matrix_enabled: true
|
||||
matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
|
||||
matrix_nginx_proxy_proxy_hydrogen_enabled: "{{ matrix_client_hydrogen_enabled }}"
|
||||
matrix_nginx_proxy_proxy_cinny_enabled: "{{ matrix_client_cinny_enabled }}"
|
||||
matrix_nginx_proxy_proxy_buscarron_enabled: "{{ matrix_bot_buscarron_enabled }}"
|
||||
matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
|
||||
matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}"
|
||||
matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
|
||||
@ -1556,6 +1588,8 @@ matrix_nginx_proxy_systemd_wanted_services_list: |
|
||||
+
|
||||
(['matrix-client-cinny.service'] if matrix_client_cinny_enabled else [])
|
||||
+
|
||||
(['matrix-bot-buscarron.service'] if matrix_bot_buscarron_enabled else [])
|
||||
+
|
||||
(['matrix-client-element.service'] if matrix_client_element_enabled else [])
|
||||
+
|
||||
(['matrix-client-hydrogen.service'] if matrix_client_hydrogen_enabled else [])
|
||||
@ -1587,6 +1621,8 @@ matrix_ssl_domains_to_obtain_certificates_for: |
|
||||
+
|
||||
([matrix_server_fqn_cinny] if matrix_client_cinny_enabled else [])
|
||||
+
|
||||
([matrix_server_fqn_buscarron] if matrix_bot_buscarron_enabled else [])
|
||||
+
|
||||
([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
|
||||
+
|
||||
([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
|
||||
@ -1698,6 +1734,12 @@ matrix_postgres_additional_databases: |
|
||||
'password': matrix_bot_honoroit_database_password,
|
||||
}] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == 'matrix-postgres') else [])
|
||||
+
|
||||
([{
|
||||
'name': matrix_bot_buscarron_database_name,
|
||||
'username': matrix_bot_buscarron_database_username,
|
||||
'password': matrix_bot_buscarron_database_password,
|
||||
}] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == 'matrix-postgres') else [])
|
||||
+
|
||||
([{
|
||||
'name': matrix_registration_database_name,
|
||||
'username': matrix_registration_database_username,
|
||||
@ -2315,9 +2357,9 @@ matrix_dendrite_container_https_host_bind_address: "{{ '' if matrix_nginx_proxy_
|
||||
|
||||
matrix_dendrite_sync_api_real_ip_header: "{{ 'X-Forwarded-For' if matrix_nginx_proxy_enabled else '' }}"
|
||||
|
||||
matrix_dendrite_registration_shared_secret: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'dendrite.rss') | to_uuid }}"
|
||||
matrix_dendrite_registration_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.rss') | to_uuid }}"
|
||||
|
||||
matrix_dendrite_database_password: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'dendrite.db') | to_uuid }}"
|
||||
matrix_dendrite_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.db') | to_uuid }}"
|
||||
|
||||
# Even if TURN doesn't support TLS (it does by default),
|
||||
# it doesn't hurt to try a secure connection anyway.
|
||||
|
370
inventory/host_vars/matrix.finallycoffee.eu/vars.yml
Normal file
370
inventory/host_vars/matrix.finallycoffee.eu/vars.yml
Normal file
@ -0,0 +1,370 @@
|
||||
#
|
||||
# General config
|
||||
# Domain of the matrix server and SSL config
|
||||
#
|
||||
matrix_domain: finallycoffee.eu
|
||||
|
||||
matrix_ssl_retrieval_method: none
|
||||
matrix_nginx_proxy_enabled: true
|
||||
matrix_nginx_proxy_https_enabled: false
|
||||
matrix_nginx_proxy_container_http_host_bind_port: "127.0.10.1:8080"
|
||||
matrix_nginx_proxy_container_federation_host_bind_port: "127.0.10.1:8448"
|
||||
matrix_nginx_proxy_trust_forwarded_proto: true
|
||||
matrix_nginx_proxy_x_forwarded_for: '$proxy_add_x_forwarded_for'
|
||||
|
||||
matrix_nginx_proxy_proxy_synapse_metrics: true
|
||||
|
||||
matrix_base_data_path: "{{ vault_matrix_base_data_path }}"
|
||||
matrix_server_fqn_element: "chat.{{ matrix_domain }}"
|
||||
matrix_docker_installation_enabled: false
|
||||
|
||||
web_user: "web"
|
||||
revproxy_autoload_dir: "/vault/services/web/sites.d"
|
||||
|
||||
#matrix_client_element_version: v1.8.4
|
||||
#matrix_synapse_docker_image: "{{ matrix_synapse_docker_image_name_prefix }}matrixdotorg/synapse:v1.37.1"
|
||||
#matrix_mautrix_telegram_version: v0.10.0
|
||||
|
||||
#
|
||||
# General Synapse config
|
||||
#
|
||||
matrix_postgres_connection_password: "{{ vault_matrix_postgres_connection_password }}"
|
||||
# A secret used to protect access keys issued by the server.
|
||||
matrix_homeserver_generic_secret_key: "{{ vault_homeserver_generic_secret_key }}"
|
||||
# Make synapse accept larger media aswell
|
||||
matrix_synapse_max_upload_size_mb: 200
|
||||
# Enable metrics at (default) :9100/_synapse/metrics
|
||||
matrix_synapse_metrics_enabled: true
|
||||
matrix_synapse_enable_group_creation: true
|
||||
matrix_synapse_turn_shared_secret: "{{ vault_matrix_coturn_turn_static_auth_secret }}"
|
||||
matrix_synapse_turn_uris:
|
||||
- "turn:voip.matrix.finallycoffee.eu?transport=udp"
|
||||
- "turn:voip.matrix.finallycoffee.eu?transport=tcp"
|
||||
# Auto-join all users into those rooms
|
||||
matrix_synapse_auto_join_rooms:
|
||||
- "#welcome:finallycoffee.eu"
|
||||
- "#announcements:finallycoffee.eu"
|
||||
|
||||
## Synapse rate limits
|
||||
matrix_synapse_rc_federation:
|
||||
window_size: 1000
|
||||
sleep_limit: 25
|
||||
sleep_delay: 500
|
||||
reject_limit: 50
|
||||
concurrent: 5
|
||||
matrix_synapse_rc_message:
|
||||
per_second: 0.5
|
||||
burst_count: 25
|
||||
|
||||
## Synapse cache tuning
|
||||
matrix_synapse_caches_global_factor: 1.5
|
||||
matrix_synapse_event_cache_size: "300K"
|
||||
|
||||
## Synapse workers
|
||||
matrix_synapse_workers_enabled: true
|
||||
matrix_synapse_workers_preset: "little-federation-helper"
|
||||
matrix_synapse_workers_generic_workers_count: 2
|
||||
matrix_synapse_workers_media_repository_workers_count: 2
|
||||
matrix_synapse_workers_federation_sender_workers_count: 3
|
||||
matrix_synapse_workers_pusher_workers_count: 1
|
||||
matrix_synapse_workers_appservice_workers_count: 1
|
||||
|
||||
# Static secret auth for matrix-synapse-shared-secret-auth
|
||||
matrix_synapse_ext_password_provider_shared_secret_auth_enabled: true
|
||||
matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: "{{ vault_matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
|
||||
matrix_synapse_ext_password_provider_rest_auth_enabled: true
|
||||
matrix_synapse_ext_password_provider_rest_auth_endpoint: "http://matrix-ma1sd:8090"
|
||||
matrix_synapse_ext_password_provider_rest_auth_registration_enforce_lowercase: false
|
||||
matrix_synapse_ext_password_provider_rest_auth_registration_profile_name_autofill: true
|
||||
matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill: false
|
||||
|
||||
# Enable experimental spaces support
|
||||
matrix_synapse_configuration_extension_yaml: |
|
||||
database:
|
||||
args:
|
||||
cp_max: 20
|
||||
experimental_features:
|
||||
spaces_enabled: true
|
||||
caches:
|
||||
per_cache_factors:
|
||||
device_id_exists: 3
|
||||
get_users_in_room: 4
|
||||
_get_joined_users_from_context: 4
|
||||
_get_joined_profile_from_event_id: 3
|
||||
"*stateGroupMembersCache*": 2
|
||||
_matches_user_in_member_list: 3
|
||||
get_users_who_share_room_with_user: 3
|
||||
is_interested_in_room: 2
|
||||
get_user_by_id: 1.5
|
||||
room_push_rule_cache: 1.5
|
||||
expire_caches: true
|
||||
cache_entry_ttl: 45m
|
||||
sync_response_cache_duration: 2m
|
||||
|
||||
|
||||
#
|
||||
# synapse-admin tool
|
||||
#
|
||||
matrix_synapse_admin_enabled: true
|
||||
matrix_synapse_admin_container_http_host_bind_port: 8985
|
||||
|
||||
|
||||
#
|
||||
# VoIP / CoTURN config
|
||||
#
|
||||
# A shared secret (between Synapse and Coturn) used for authentication.
|
||||
matrix_coturn_turn_static_auth_secret: "{{ vault_matrix_coturn_turn_static_auth_secret }}"
|
||||
# Disable coturn, as we use own instance
|
||||
matrix_coturn_enabled: false
|
||||
|
||||
|
||||
#
|
||||
# dimension (integration manager) config
|
||||
#
|
||||
matrix_dimension_enabled: true
|
||||
matrix_dimension_admins: "{{ vault_matrix_dimension_admins }}"
|
||||
matrix_server_fqn_dimension: "dimension.matrix.{{ matrix_domain }}"
|
||||
matrix_dimension_access_token: "{{ vault_matrix_dimension_access_token }}"
|
||||
matrix_dimension_configuration_extension_yaml: |
|
||||
telegram:
|
||||
botToken: "{{ vault_matrix_dimension_configuration_telegram_bot_token }}"
|
||||
|
||||
|
||||
#
|
||||
# mautrix-whatsapp config
|
||||
#
|
||||
matrix_mautrix_whatsapp_enabled: true
|
||||
matrix_mautrix_whatsapp_container_http_monitoring_host_bind_port: 9402
|
||||
matrix_mautrix_whatsapp_container_extra_arguments:
|
||||
- "-p 127.0.0.1:{{ matrix_mautrix_whatsapp_container_http_monitoring_host_bind_port }}:{{ matrix_mautrix_whatsapp_container_http_monitoring_host_bind_port }}"
|
||||
matrix_mautrix_whatsapp_configuration_extension_yaml: |
|
||||
bridge:
|
||||
displayname_template: "{% raw %}{{.Name}} ({{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}}) (via WhatsApp){% endraw %}"
|
||||
max_connection_attempts: 5
|
||||
connection_timeout: 30
|
||||
contact_wait_delay: 5
|
||||
private_chat_portal_meta: true
|
||||
login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
|
||||
logging:
|
||||
print_level: info
|
||||
metrics:
|
||||
enabled: true
|
||||
listen: 0.0.0.0:{{ matrix_mautrix_whatsapp_container_http_monitoring_host_bind_port }}
|
||||
whatsapp:
|
||||
os_name: Linux mautrix-whatsapp
|
||||
browser_name: Chrome
|
||||
|
||||
|
||||
#
|
||||
# mautrix-telegram config
|
||||
#
|
||||
matrix_mautrix_telegram_enabled: true
|
||||
matrix_mautrix_telegram_api_id: "{{ vault_matrix_mautrix_telegram_api_id }}"
|
||||
matrix_mautrix_telegram_api_hash: "{{ vault_matrix_mautrix_telegram_api_hash }}"
|
||||
matrix_mautrix_telegram_public_endpoint: '/bridge/telegram'
|
||||
matrix_mautrix_telegram_container_http_monitoring_host_bind_port: 9401
|
||||
matrix_mautrix_telegram_container_http_host_bind_port_public: 8980
|
||||
matrix_mautrix_telegram_container_extra_arguments:
|
||||
- "-p 127.0.0.1:{{ matrix_mautrix_telegram_container_http_monitoring_host_bind_port }}:{{ matrix_mautrix_telegram_container_http_monitoring_host_bind_port }}"
|
||||
- "-p 127.0.0.1:{{ matrix_mautrix_telegram_container_http_host_bind_port_public }}:80"
|
||||
matrix_mautrix_telegram_configuration_extension_yaml: |
|
||||
bridge:
|
||||
displayname_template: "{displayname} (via Telegram)"
|
||||
parallel_file_transfer: false
|
||||
inline_images: false
|
||||
image_as_file_size: 20
|
||||
delivery_receipts: true
|
||||
login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
|
||||
animated_sticker:
|
||||
target: webm
|
||||
encryption:
|
||||
allow: true
|
||||
default: true
|
||||
permissions:
|
||||
"@transcaffeine:finallycoffee.eu": "admin"
|
||||
"gruenhage.xyz": "full"
|
||||
logging:
|
||||
root:
|
||||
level: INFO
|
||||
metrics:
|
||||
enabled: true
|
||||
listen_port: {{ matrix_mautrix_telegram_container_http_monitoring_host_bind_port }}
|
||||
# permissions: "{{ vault_matrix_mautrix_telegram_permission_map | from_yaml }}"
|
||||
|
||||
|
||||
#
|
||||
# mautrix-signal config
|
||||
#
|
||||
matrix_mautrix_signal_enabled: true
|
||||
matrix_mautrix_signal_container_http_monitoring_host_bind_port: 9408
|
||||
matrix_mautrix_signal_container_extra_arguments:
|
||||
- "-p 127.0.0.1:{{ matrix_mautrix_signal_container_http_monitoring_host_bind_port }}:{{ matrix_mautrix_signal_container_http_monitoring_host_bind_port }}"
|
||||
matrix_mautrix_signal_configuration_extension_yaml: |
|
||||
bridge:
|
||||
displayname_template: "{displayname} (via Signal)"
|
||||
community_id: "+signal:finallycoffee.eu"
|
||||
encryption:
|
||||
allow: true
|
||||
default: true
|
||||
key_sharing:
|
||||
allow: true
|
||||
require_verification: false
|
||||
delivery_receipts: true
|
||||
permissions:
|
||||
"@ilosai:fairydust.space": "user"
|
||||
logging:
|
||||
root:
|
||||
level: INFO
|
||||
metrics:
|
||||
enabled: true
|
||||
listen_port: {{ matrix_mautrix_signal_container_http_monitoring_host_bind_port }}
|
||||
|
||||
|
||||
#
|
||||
# mx-puppet-instagram configuration
|
||||
#
|
||||
matrix_mx_puppet_instagram_enabled: true
|
||||
matrix_mx_puppet_instagram_container_http_monitoring_host_bind_port: 9403
|
||||
matrix_mx_puppet_instagram_container_extra_arguments:
|
||||
- "-p 127.0.0.1:{{ matrix_mx_puppet_instagram_container_http_monitoring_host_bind_port }}:{{ matrix_mx_puppet_instagram_container_http_monitoring_host_bind_port }}"
|
||||
matrix_mx_puppet_instagram_configuration_extension_yaml: |
|
||||
bridge:
|
||||
enableGroupSync: true
|
||||
avatarUrl: mxc://finallycoffee.eu/acmiSAinuHDOULofFFeolTvr
|
||||
metrics:
|
||||
enabled: true
|
||||
port: {{ matrix_mx_puppet_instagram_container_http_monitoring_host_bind_port }}
|
||||
path: /metrics
|
||||
presence:
|
||||
enabled: true
|
||||
interval: 3000
|
||||
|
||||
|
||||
#
|
||||
# mx-puppet-skype configuration
|
||||
#
|
||||
matrix_mx_puppet_skype_enabled: true
|
||||
matrix_mx_puppet_skype_container_http_monitoring_host_bind_port: 9405
|
||||
matrix_mx_puppet_skype_container_extra_arguments:
|
||||
- "-p 127.0.0.1:{{ matrix_mx_puppet_skype_container_http_monitoring_host_bind_port }}:{{ matrix_mx_puppet_skype_container_http_monitoring_host_bind_port }}"
|
||||
matrix_mx_puppet_skype_configuration_extension_yaml: |
|
||||
bridge:
|
||||
enableGroupSync: true
|
||||
avatarUrl: mxc://finallycoffee.eu/jjXDuFqtpFOBOnywoHgzTuYt
|
||||
metrics:
|
||||
enabled: true
|
||||
port: {{ matrix_mx_puppet_skype_container_http_monitoring_host_bind_port }}
|
||||
path: /metrics
|
||||
|
||||
|
||||
#
|
||||
# mx-puppet-discord configuration
|
||||
#
|
||||
matrix_mx_puppet_discord_enabled: true
|
||||
matrix_mx_puppet_discord_client_id: "{{ vault_matrix_mx_puppet_discord_client_id }}"
|
||||
matrix_mx_puppet_discord_client_secret: "{{ vault_matrix_mx_puppet_discord_client_secret }}"
|
||||
matrix_mx_puppet_discord_container_http_monitoring_host_bind_port: 9404
|
||||
matrix_mx_puppet_discord_container_extra_arguments:
|
||||
- "-p 127.0.0.1:{{ matrix_mx_puppet_discord_container_http_monitoring_host_bind_port }}:{{ matrix_mx_puppet_discord_container_http_monitoring_host_bind_port }}"
|
||||
matrix_mx_puppet_discord_configuration_extension_yaml: |
|
||||
bridge:
|
||||
enableGroupSync: true
|
||||
avatarUrl: mxc://finallycoffee.eu/BxcAAhjXmglMbtthStEHtCzd
|
||||
metrics:
|
||||
enabled: true
|
||||
port: {{ matrix_mx_puppet_discord_container_http_monitoring_host_bind_port }}
|
||||
path: /metrics
|
||||
limits:
|
||||
maxAutojoinUsers: 500
|
||||
roomUserAutojoinDelay: 50
|
||||
presence:
|
||||
enabled: true
|
||||
interval: 3000
|
||||
|
||||
|
||||
#
|
||||
# mx-puppet-slack configuration
|
||||
#
|
||||
matrix_mx_puppet_slack_enabled: true
|
||||
matrix_mx_puppet_slack_client_id: "{{ vault_matrix_mx_puppet_slack_client_id }}"
|
||||
matrix_mx_puppet_slack_client_secret: "{{ vault_matrix_mx_puppet_slack_client_secret }}"
|
||||
matrix_mx_puppet_slack_redirect_path: '/bridge/slack/oauth'
|
||||
matrix_mx_puppet_slack_container_http_auth_host_bind_port: 8981
|
||||
matrix_mx_puppet_slack_container_http_monitoring_host_bind_port: 9406
|
||||
matrix_mx_puppet_slack_container_extra_arguments:
|
||||
- "-p 127.0.0.1:{{ matrix_mx_puppet_slack_container_http_monitoring_host_bind_port }}:{{ matrix_mx_puppet_slack_container_http_monitoring_host_bind_port }}"
|
||||
- "-p 127.0.0.1:{{ matrix_mx_puppet_slack_container_http_auth_host_bind_port }}:8008"
|
||||
matrix_mx_puppet_slack_configuration_extension_yaml: |
|
||||
bridge:
|
||||
enableGroupSync: true
|
||||
metrics:
|
||||
enabled: true
|
||||
port: {{ matrix_mx_puppet_slack_container_http_monitoring_host_bind_port }}
|
||||
path: /metrics
|
||||
limits:
|
||||
maxAutojoinUsers: 500
|
||||
roomUserAutojoinDelay: 50
|
||||
presence:
|
||||
enabled: true
|
||||
interval: 3000
|
||||
|
||||
|
||||
#
|
||||
# Element web configuration
|
||||
#
|
||||
# Branding config
|
||||
matrix_client_element_brand: "Chat"
|
||||
matrix_client_element_default_theme: "dark"
|
||||
matrix_client_element_themes_enabled: true
|
||||
matrix_client_element_welcome_headline: "Welcome to chat.finallycoffee.eu"
|
||||
matrix_client_element_welcome_text: |
|
||||
Decentralised, encrypted chat & collaboration,<br />
|
||||
hosted on finallycoffee.eu, powered by element.io &
|
||||
<a href="https://matrix.org" target="_blank" rel="noreferrer noopener">
|
||||
<img width="79" height="34" alt="[matrix]" style="padding-left: 1px;vertical-align: middle" src="welcome/images/matrix.svg" />
|
||||
</a>
|
||||
matrix_client_element_welcome_logo: "welcome/images/logo.png"
|
||||
matrix_client_element_welcome_logo_link: "https://{{ matrix_domain }}"
|
||||
matrix_client_element_branding_authHeaderLogoUrl: "welcome/images/logo.png"
|
||||
matrix_client_element_branding_welcomeBackgroundUrl: "welcome/images/background.jpg"
|
||||
matrix_client_element_container_extra_arguments:
|
||||
- "-v {{ matrix_client_element_data_path }}/background.jpg:/app/{{ matrix_client_element_branding_welcomeBackgroundUrl }}:ro"
|
||||
- "-v {{ matrix_client_element_data_path }}/logo.png:/app/{{ matrix_client_element_branding_authHeaderLogoUrl }}:ro"
|
||||
# Integration and capabilites config
|
||||
matrix_client_element_integrations_ui_url: "https://{{ matrix_server_fqn_dimension }}/element"
|
||||
matrix_client_element_integrations_rest_url: "https://{{ matrix_server_fqn_dimension }}/api/v1/scalar"
|
||||
matrix_client_element_integrations_widgets_urls:
|
||||
- "https://{{ matrix_server_fqn_dimension }}/widgets"
|
||||
- "https://scalar.vector.im/api"
|
||||
matrix_client_element_integrations_jitsi_widget_url: "https://{{ matrix_server_fqn_dimension }}/widgets/jitsi"
|
||||
matrix_client_element_disable_custom_urls: false
|
||||
matrix_client_element_roomdir_servers:
|
||||
- "matrix.org"
|
||||
- "finallycoffee.eu"
|
||||
- "entropia.de"
|
||||
matrix_client_element_enable_presence_by_hs_url:
|
||||
https://matrix.org: false
|
||||
|
||||
|
||||
# Matrix ma1sd extended configuration
|
||||
matrix_ma1sd_configuration_extension_yaml: |
|
||||
hashing:
|
||||
enabled: true
|
||||
pepperLength: 20
|
||||
rotationPolicy: per_requests
|
||||
requests: 10
|
||||
hashStorageType: sql
|
||||
algorithms:
|
||||
- none
|
||||
- sha256
|
||||
|
||||
|
||||
# Matrix mail notification relay setup
|
||||
matrix_mailer_enabled: true
|
||||
matrix_mailer_sender_address: "Matrix on finallycoffee.eu <system-matrix@{{ matrix_domain }}>"
|
||||
matrix_mailer_relay_use: true
|
||||
matrix_mailer_relay_host_name: "{{ vault_matrix_mailer_relay_host_name }}"
|
||||
matrix_mailer_relay_host_port: 587
|
||||
matrix_mailer_relay_auth: true
|
||||
matrix_mailer_relay_auth_username: "{{ vault_matrix_mailer_relay_auth_username }}"
|
||||
matrix_mailer_relay_auth_password: "{{ vault_matrix_mailer_relay_auth_password }}"
|
100
inventory/host_vars/matrix.finallycoffee.eu/vault.yml
Normal file
100
inventory/host_vars/matrix.finallycoffee.eu/vault.yml
Normal file
@ -0,0 +1,100 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
39366364363633336238333130353832663162393038633665396333343732353964333363666539
|
||||
6562346632343235623835643735386434316666393234360a383634616537393134613631383836
|
||||
61333835363666623033306166376232303930306433343366373463653234623736643633383734
|
||||
3330333665383539650a383132353032386230393031626361343764323034386230363066306331
|
||||
34646236336262623435633566363033613737373064616266336237343233663066396163373034
|
||||
62303765353066653737366539626461636531636438323932333134363136363134646164646531
|
||||
63656638666233313437663261396665653736373164323433306435323336633938313164646264
|
||||
33653661633965363833393031616463633761356234633630643562306366653133366637346166
|
||||
38636433343736343461613731623538633361363934343764326466313261353633646230353065
|
||||
37366134303164356433333961346663313963626165323966656536313532376162326565383539
|
||||
65363333633964323838663461373666353665643236623839646664653661613838353239613137
|
||||
39353061323131306365656261343630313665356165623064616436653566373663343733316237
|
||||
34393666383465323463313838393465643830373632373938633763666636346539666233303265
|
||||
38353337633833373331356663633936326334366337393135653030333531613565643666633038
|
||||
64393862303765366632393137313432376563353335353231323464633637343334346634306534
|
||||
35613330373336633031376263306466306437656635396133613335386130346163663438386136
|
||||
61646437343938663431343736363564376238316666373531616231366132643864346538363866
|
||||
35396433366137356162313963666134383134306462313336613735386639363936326131383939
|
||||
66623833643433663039623837623133303336666233623935313438366136353332313165333936
|
||||
31386632336535383533646639636164313331346630633366383739623261366465656632393062
|
||||
63373332623738303364623437666531396331646666336230353333366261653438363861656466
|
||||
39333762633037383336393164616563396564383232636533363864636230616664303330323932
|
||||
66666234633362346132303932643464366466323535303835363430333737666661373534333934
|
||||
61393362616438626636383564613335363634626231663234616438343464383461303632363033
|
||||
39336362396339316661323662393665383031643931626333646335643335353661653939363538
|
||||
38666561313539613566386132336630643237333432656236356132616230663561343665353938
|
||||
33366663353834356434366335373265373439363430636533303933656264366338623232613435
|
||||
35356662383232386137313064313363303861326635333435393737643663336534363234623430
|
||||
32376432353330613666396337303935376366613564353039396164383361616337656535346166
|
||||
34396635356266326461613135303639643935363261396363636338636564643838313262326266
|
||||
31663139343336376233303637373864363835313839326433656235616332333134306139623239
|
||||
37636639356263646437373362333931613262363363313462666534643765313139386461623731
|
||||
33376635653133353033333733613464396632636634313063326363313030376632643863336237
|
||||
61636638353237313764313435626463633964643665313536326235343639663137373436303564
|
||||
30636232626137376339303238653664346538356430306238633037366332316263623666373062
|
||||
63646533646131303466653637346463613237323161313265613834383634626237323563653733
|
||||
38656435303264346663663465333966376631666530333833353233376263336436613065366362
|
||||
36366263343438393132326661623031316663663231663464383732343064383234616636306530
|
||||
66613634626362316533303034393063666632343262613431613635663866636433623535363238
|
||||
30643933613731363236346234336662613633323831633437613435326465383530653765616262
|
||||
63373538396364316563343365303134373466663639386137663564356532353531343636613135
|
||||
63316463353264316164306566326462333732316431643939626161346530636638636662303037
|
||||
34346461313961613063336332333934383363373335616636363661396362613661383762663866
|
||||
64303834636264376461396266663763336665356561376161333136336638646363313133353161
|
||||
31643061623833623239373432633537663664636334623534326639616633616361333834366131
|
||||
30376361656238353332656666316637643133623433333861653265636266376639666135383638
|
||||
37363337326231656530363536393737383565666266306532626361633633353539363866376534
|
||||
61303737326632303762626666306134343837376566343035386663613336626332383035383035
|
||||
37633462373066373062313862323766316362393832666466396637363562353865303366323062
|
||||
39346332383966313437646138623364656234663066663639663138626163656433363038323166
|
||||
65613862386665643438323061323763306635666162303366323131363436633335356332393366
|
||||
63373966383132303434633835333438333337303664346335643066623839343835643364306561
|
||||
34643336346564363462396330643263653931376664386335313433376332653832323437376135
|
||||
35383231386133363236653334393433306638303131323064343931623538323130343666653061
|
||||
36353536383632333964343730346265626433303131346531303133663832363036333261386237
|
||||
30363361356265356139323761623563396565336137333733656431636531333234323061343862
|
||||
33623935346663333735613661363234646234356331323636386637343661373363363261646231
|
||||
33643233343235323230393933616664623166666266333862323631653835666135303233653635
|
||||
63373061656163353762636531613632366638383366303864343132376162643963366564363563
|
||||
61336338613935613532636165383463633866633036393533313433643562313737383431353163
|
||||
37623165373933376236393931363939633963666636303136373065376635623761346537643530
|
||||
35363464313630376233633863306238616138666464316534363332333937343362343233346431
|
||||
34643032323934353939666364323239653932363735373061633434653062326336353239633261
|
||||
38306237336266663038656534393664646138343038323335633064616431386666613739326630
|
||||
34383963666534313530376331366238343836303036306336343533666332386163643033643138
|
||||
33336333333338353733383165306139623964303035653439623131633566356136386431613135
|
||||
63616462386639303230343866346631346532353531373132613433363239646330653666633532
|
||||
65393766333238383531313132633537633833363335303630376239396565373730646331313633
|
||||
30383861303739343265623934643635633361623262356433323035393062353630346430646262
|
||||
63303434353038646361353661616339313937323336303566303536366163623362356332383862
|
||||
37326333393761633732653264646333653439363039323238383361336233323232613336303464
|
||||
34393635633131313135313665363161306466643364393734346264633030373234306466653862
|
||||
32336163666435636162343465386633653863363533616339636531306130383331376563393533
|
||||
65366136626662343065383164646665613035393636373565346235656439303933343563366339
|
||||
36643838393033353033396535613331303031646162316361613564323163633434633861356135
|
||||
62343461616335323565636633383962316531316362396165366533346166336163623232366261
|
||||
39376230376562626135346333326437373733373266393236383435343562653034313133376236
|
||||
61666138346562613330633630373837653465393233613261353937336666646231366666393335
|
||||
35393463333936323664323831396639333462626238613164616435363664643438653763623431
|
||||
32663237363134353061373563396535653565636431366565386337653863316333343738343432
|
||||
62303132636338303462313439376535363063333833363632613832303436353834376561333330
|
||||
66633632383135646263626333643230343630326539663762633934316261633062663732373932
|
||||
30306438386263626335373838343236643562326135663366353638353163346365396261313133
|
||||
36333634306133353235316237343738623263333732343063356238333162323931346664346539
|
||||
66323733643061386334306130633537353630663336313966663538373963313435666564316539
|
||||
63613030366332363432303036396232306537663765653938353736376135316539613135623632
|
||||
66356639623635663365323635646635383638346539323438336261393332373935383536333831
|
||||
61306639343061333639336162366536366438356166396266666132303932333037613632623666
|
||||
63616662343830303664353931306632323630316162643432653835313962633735626163366332
|
||||
34373637633066333432383533316363613031393963373963386161663430623533383165653561
|
||||
38343439633066366663643138326264653539336530393932386236366533663935353664343966
|
||||
39323161646231353234633961633732613065323039663062313661386565366534623430356632
|
||||
64343732336238393262363338363734643639353830646163343361653761633134303163616562
|
||||
35633436393832393137383534613031303963613339333566343065336530623964636662353065
|
||||
32366630353538383339346465376661323666333234373665613164633866363364613066643034
|
||||
37616630366232353166366535633936366536626462353831643335306337353564316461653564
|
||||
66663133373466333431336366346435623436656230376232613665633466333463636263373464
|
||||
30386434336538303061666566383033616563303564666362346432663130306531613063363537
|
||||
646635613236636563666161666630653836
|
22
inventory/hosts
Normal file
22
inventory/hosts
Normal file
@ -0,0 +1,22 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
31336566376336626265653165306635633033376662656164383037383834653239656136333734
|
||||
3833666339393037323035343565343235396163636166370a643933333933386133366564396465
|
||||
30393637613164356564393337633361653432333232383664303739363736633435363764343530
|
||||
3532313739363963660a343434356534316230623133636366386334323465376139363162616238
|
||||
39396638366262313531653635326361616537396338363533303961623165343931373939306239
|
||||
31336632643166633662653765333231393461643933306464303165633037343061323636313034
|
||||
34376631656563646665373566633431366638383863666130323264316337663237343135306236
|
||||
66323536346164663239343139623430303230333466633437643337343930363530653964626163
|
||||
38336363633730393136333637383631636266396636646533356262376630646139303636666538
|
||||
32366437353163663865623234643061313639646162643965393535353938313133326237313265
|
||||
66646163333535396539646461356334633532313530653834623263386265383765356130333466
|
||||
30373531306137393935363030313739666536363138363962646565306439393239303030643162
|
||||
33333166663430393866666439653532623034396130313066383035396535646633366237303264
|
||||
36356665366461323664373038366364623937386233313039323837666333653764616462333365
|
||||
31326264633236373937313537633961633164323138356135633765663639323537656263633766
|
||||
38653836323263386333376131333330326237393666363064326463663961633839393039323835
|
||||
61306265333232623037356465393133323733363634646364336261326333366239346565366338
|
||||
61646132333033373866623739343830336164316461646366666237313565626639323537623732
|
||||
38323830656136323137323530343764666433633432366136643538323832653130376363653135
|
||||
64376261386635636533353961613335663962306337353866616464613636303735336230623962
|
||||
3336
|
@ -37,6 +37,9 @@ matrix_server_fqn_hydrogen: "hydrogen.{{ matrix_domain }}"
|
||||
# This is where you access the Cinny web client from (if enabled via matrix_client_cinny_enabled; disabled by default).
|
||||
matrix_server_fqn_cinny: "cinny.{{ matrix_domain }}"
|
||||
|
||||
# This is where you access the buscarron bot from (if enabled via matrix_bot_buscarron_enabled; disabled by default).
|
||||
matrix_server_fqn_buscarron: "buscarron.{{ matrix_domain }}"
|
||||
|
||||
# This is where you access the Dimension.
|
||||
matrix_server_fqn_dimension: "dimension.{{ matrix_domain }}"
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
when: matrix_docker_installation_enabled|bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure yum packages are installed
|
||||
when: false
|
||||
yum:
|
||||
name:
|
||||
- "{{ matrix_ntpd_package }}"
|
||||
|
@ -28,4 +28,4 @@
|
||||
- "{{ matrix_docker_package_name }}"
|
||||
- docker-python
|
||||
state: latest
|
||||
when: matrix_docker_installation_enabled|bool
|
||||
when: matrix_docker_installation_enabled|bool and false
|
||||
|
96
roles/matrix-bot-buscarron/defaults/main.yml
Normal file
96
roles/matrix-bot-buscarron/defaults/main.yml
Normal file
@ -0,0 +1,96 @@
|
||||
---
|
||||
# buscarron is a helpdesk bot
|
||||
# See: https://gitlab.com/etke.cc/buscarron
|
||||
|
||||
matrix_bot_buscarron_enabled: true
|
||||
|
||||
matrix_bot_buscarron_container_image_self_build: false
|
||||
matrix_bot_buscarron_docker_repo: "https://gitlab.com/etke.cc/buscarron.git"
|
||||
matrix_bot_buscarron_docker_src_files_path: "{{ matrix_base_data_path }}/buscarron/docker-src"
|
||||
|
||||
matrix_bot_buscarron_version: v1.0.0
|
||||
matrix_bot_buscarron_docker_image: "{{ matrix_bot_buscarron_docker_image_name_prefix }}buscarron:{{ matrix_bot_buscarron_version }}"
|
||||
matrix_bot_buscarron_docker_image_name_prefix: "{{ 'localhost/' if matrix_bot_buscarron_container_image_self_build else 'registry.gitlab.com/etke.cc/' }}"
|
||||
matrix_bot_buscarron_docker_image_force_pull: "{{ matrix_bot_buscarron_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_bot_buscarron_base_path: "{{ matrix_base_data_path }}/buscarron"
|
||||
matrix_bot_buscarron_config_path: "{{ matrix_bot_buscarron_base_path }}/config"
|
||||
matrix_bot_buscarron_data_path: "{{ matrix_bot_buscarron_base_path }}/data"
|
||||
matrix_bot_buscarron_data_store_path: "{{ matrix_bot_buscarron_data_path }}/store"
|
||||
|
||||
# A list of extra arguments to pass to the container
|
||||
matrix_bot_buscarron_container_extra_arguments: []
|
||||
|
||||
# List of systemd services that matrix-bot-buscarron.service depends on
|
||||
matrix_bot_buscarron_systemd_required_services_list: ['docker.service']
|
||||
|
||||
# List of systemd services that matrix-bot-buscarron.service wants
|
||||
matrix_bot_buscarron_systemd_wanted_services_list: []
|
||||
|
||||
|
||||
# Database-related configuration fields.
|
||||
#
|
||||
# To use SQLite, stick to these defaults.
|
||||
#
|
||||
# To use Postgres:
|
||||
# - change the engine (`matrix_bot_buscarron_database_engine: 'postgres'`)
|
||||
# - adjust your database credentials via the `matrix_bot_buscarron_database_*` variables
|
||||
matrix_bot_buscarron_database_engine: 'sqlite'
|
||||
|
||||
matrix_bot_buscarron_sqlite_database_path_local: "{{ matrix_bot_buscarron_data_path }}/bot.db"
|
||||
matrix_bot_buscarron_sqlite_database_path_in_container: "/data/bot.db"
|
||||
|
||||
matrix_bot_buscarron_database_username: 'buscarron'
|
||||
matrix_bot_buscarron_database_password: 'some-password'
|
||||
matrix_bot_buscarron_database_hostname: 'matrix-postgres'
|
||||
matrix_bot_buscarron_database_port: 5432
|
||||
matrix_bot_buscarron_database_name: 'buscarron'
|
||||
|
||||
matrix_bot_buscarron_database_connection_string: 'postgres://{{ matrix_bot_buscarron_database_username }}:{{ matrix_bot_buscarron_database_password }}@{{ matrix_bot_buscarron_database_hostname }}:{{ matrix_bot_buscarron_database_port }}/{{ matrix_bot_buscarron_database_name }}?sslmode=disable'
|
||||
|
||||
matrix_bot_buscarron_storage_database: "{{
|
||||
{
|
||||
'sqlite': matrix_bot_buscarron_sqlite_database_path_in_container,
|
||||
'postgres': matrix_bot_buscarron_database_connection_string,
|
||||
}[matrix_bot_buscarron_database_engine]
|
||||
}}"
|
||||
|
||||
matrix_bot_buscarron_database_dialect: "{{
|
||||
{
|
||||
'sqlite': 'sqlite3',
|
||||
'postgres': 'postgres',
|
||||
}[matrix_bot_buscarron_database_engine]
|
||||
}}"
|
||||
|
||||
|
||||
# The bot's username. This user needs to be created manually beforehand.
|
||||
# Also see `matrix_bot_buscarron_password`.
|
||||
matrix_bot_buscarron_login: "bot.buscarron"
|
||||
|
||||
# The password that the bot uses to authenticate.
|
||||
matrix_bot_buscarron_password: ''
|
||||
|
||||
# the homeserver URL, uses internal synapse container address by default
|
||||
matrix_bot_buscarron_homeserver: "{{ matrix_homeserver_container_url }}"
|
||||
|
||||
# forms configuration
|
||||
matrix_bot_buscarron_forms: []
|
||||
|
||||
# Sentry DSN
|
||||
matrix_bot_buscarron_sentry:
|
||||
|
||||
# Log level
|
||||
matrix_bot_buscarron_loglevel: INFO
|
||||
|
||||
# spam hosts/domains
|
||||
matrix_bot_buscarron_spam_hosts: []
|
||||
|
||||
# spam email addresses
|
||||
matrix_bot_buscarron_spam_emails: []
|
||||
|
||||
# Additional environment variables to pass to the buscarron container
|
||||
#
|
||||
# Example:
|
||||
# matrix_bot_buscarron_environment_variables_extension: |
|
||||
# BUSCARRON_LOGLEVEL=DEBUG
|
||||
matrix_bot_buscarron_environment_variables_extension: ''
|
5
roles/matrix-bot-buscarron/tasks/init.yml
Normal file
5
roles/matrix-bot-buscarron/tasks/init.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
- set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-buscarron.service'] }}"
|
||||
when: matrix_bot_buscarron_enabled|bool
|
23
roles/matrix-bot-buscarron/tasks/main.yml
Normal file
23
roles/matrix-bot-buscarron/tasks/main.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/init.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
when: "run_setup|bool and matrix_bot_buscarron_enabled|bool"
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-bot-buscarron
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||
when: "run_setup|bool and matrix_bot_buscarron_enabled|bool"
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-bot-buscarron
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||
when: "run_setup|bool and not matrix_bot_buscarron_enabled|bool"
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-bot-buscarron
|
100
roles/matrix-bot-buscarron/tasks/setup_install.yml
Normal file
100
roles/matrix-bot-buscarron/tasks/setup_install.yml
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
- set_fact:
|
||||
matrix_bot_buscarron_requires_restart: false
|
||||
|
||||
- block:
|
||||
- name: Check if an SQLite database already exists
|
||||
stat:
|
||||
path: "{{ matrix_bot_buscarron_sqlite_database_path_local }}"
|
||||
register: matrix_bot_buscarron_sqlite_database_path_local_stat_result
|
||||
|
||||
- block:
|
||||
- set_fact:
|
||||
matrix_postgres_db_migration_request:
|
||||
src: "{{ matrix_bot_buscarron_sqlite_database_path_local }}"
|
||||
dst: "{{ matrix_bot_buscarron_database_connection_string }}"
|
||||
caller: "{{ role_path|basename }}"
|
||||
engine_variable_name: 'matrix_bot_buscarron_database_engine'
|
||||
engine_old: 'sqlite'
|
||||
systemd_services_to_stop: ['matrix-bot-buscarron.service']
|
||||
|
||||
- import_tasks: "{{ role_path }}/../matrix-postgres/tasks/util/migrate_db_to_postgres.yml"
|
||||
|
||||
- set_fact:
|
||||
matrix_bot_buscarron_requires_restart: true
|
||||
when: "matrix_bot_buscarron_sqlite_database_path_local_stat_result.stat.exists|bool"
|
||||
when: "matrix_bot_buscarron_database_engine == 'postgres'"
|
||||
|
||||
- name: Ensure buscarron paths exist
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- {path: "{{ matrix_bot_buscarron_config_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_buscarron_data_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_buscarron_data_store_path }}", when: true}
|
||||
- {path: "{{ matrix_bot_buscarron_docker_src_files_path }}", when: true}
|
||||
when: "item.when|bool"
|
||||
|
||||
- name: Ensure buscarron environment variables file created
|
||||
template:
|
||||
src: "{{ role_path }}/templates/env.j2"
|
||||
dest: "{{ matrix_bot_buscarron_config_path }}/env"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
mode: 0640
|
||||
|
||||
- name: Ensure buscarron image is pulled
|
||||
docker_image:
|
||||
name: "{{ matrix_bot_buscarron_docker_image }}"
|
||||
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: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_buscarron_docker_image_force_pull }}"
|
||||
when: "not matrix_bot_buscarron_container_image_self_build|bool"
|
||||
register: result
|
||||
retries: "{{ matrix_container_retries_count }}"
|
||||
delay: "{{ matrix_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure buscarron repository is present on self-build
|
||||
git:
|
||||
repo: "{{ matrix_bot_buscarron_docker_repo }}"
|
||||
dest: "{{ matrix_bot_buscarron_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
become: true
|
||||
become_user: "{{ matrix_user_username }}"
|
||||
register: matrix_bot_buscarron_git_pull_results
|
||||
when: "matrix_bot_buscarron_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure buscarron image is built
|
||||
docker_image:
|
||||
name: "{{ matrix_bot_buscarron_docker_image }}"
|
||||
source: build
|
||||
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_mailer_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_bot_buscarron_docker_src_files_path }}"
|
||||
pull: true
|
||||
when: "matrix_bot_buscarron_container_image_self_build|bool"
|
||||
|
||||
- name: Ensure matrix-bot-buscarron.service installed
|
||||
template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-bot-buscarron.service.j2"
|
||||
dest: "{{ matrix_systemd_path }}/matrix-bot-buscarron.service"
|
||||
mode: 0644
|
||||
register: matrix_bot_buscarron_systemd_service_result
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-bot-buscarron.service installation
|
||||
service:
|
||||
daemon_reload: true
|
||||
when: "matrix_bot_buscarron_systemd_service_result.changed|bool"
|
||||
|
||||
- name: Ensure matrix-bot-buscarron.service restarted, if necessary
|
||||
service:
|
||||
name: "matrix-bot-buscarron.service"
|
||||
state: restarted
|
||||
when: "matrix_bot_buscarron_requires_restart|bool"
|
36
roles/matrix-bot-buscarron/tasks/setup_uninstall.yml
Normal file
36
roles/matrix-bot-buscarron/tasks/setup_uninstall.yml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
|
||||
- name: Check existence of matrix-buscarron service
|
||||
stat:
|
||||
path: "{{ matrix_systemd_path }}/matrix-bot-buscarron.service"
|
||||
register: matrix_bot_buscarron_service_stat
|
||||
|
||||
- name: Ensure matrix-buscarron is stopped
|
||||
service:
|
||||
name: matrix-bot-buscarron
|
||||
state: stopped
|
||||
enabled: false
|
||||
daemon_reload: true
|
||||
register: stopping_result
|
||||
when: "matrix_bot_buscarron_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure matrix-bot-buscarron.service doesn't exist
|
||||
file:
|
||||
path: "{{ matrix_systemd_path }}/matrix-bot-buscarron.service"
|
||||
state: absent
|
||||
when: "matrix_bot_buscarron_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure systemd reloaded after matrix-bot-buscarron.service removal
|
||||
service:
|
||||
daemon_reload: true
|
||||
when: "matrix_bot_buscarron_service_stat.stat.exists|bool"
|
||||
|
||||
- name: Ensure Matrix buscarron paths don't exist
|
||||
file:
|
||||
path: "{{ matrix_bot_buscarron_base_path }}"
|
||||
state: absent
|
||||
|
||||
- name: Ensure buscarron Docker image doesn't exist
|
||||
docker_image:
|
||||
name: "{{ matrix_bot_buscarron_docker_image }}"
|
||||
state: absent
|
9
roles/matrix-bot-buscarron/tasks/validate_config.yml
Normal file
9
roles/matrix-bot-buscarron/tasks/validate_config.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Fail if required settings not defined
|
||||
fail:
|
||||
msg: >-
|
||||
You need to define a required configuration setting (`{{ item }}`).
|
||||
when: "vars[item] == ''"
|
||||
with_items:
|
||||
- "matrix_bot_buscarron_password"
|
19
roles/matrix-bot-buscarron/templates/env.j2
Normal file
19
roles/matrix-bot-buscarron/templates/env.j2
Normal file
@ -0,0 +1,19 @@
|
||||
BUSCARRON_LOGIN={{ matrix_bot_buscarron_login }}
|
||||
BUSCARRON_PASSWORD={{ matrix_bot_buscarron_password }}
|
||||
BUSCARRON_HOMESERVER={{ matrix_bot_buscarron_homeserver }}
|
||||
BUSCARRON_DB_DSN={{ matrix_bot_buscarron_database_connection_string }}
|
||||
BUSCARRON_DB_DIALECT={{ matrix_bot_buscarron_database_dialect }}
|
||||
BUSCARRON_SPAM_HOSTS={{ matrix_bot_buscarron_spam_hosts|join(" ") }}
|
||||
BUSCARRON_SPAM_EMAILS={{ matrix_bot_buscarron_spam_emails|join(" ") }}
|
||||
BUSCARRON_SENTRY={{ matrix_bot_buscarron_sentry }}
|
||||
BUSCARRON_LOGLEVEL={{ matrix_bot_buscarron_loglevel }}
|
||||
{% set forms = [] %}
|
||||
{% for form in matrix_bot_buscarron_forms -%}{{- forms.append(form.name) -}}
|
||||
BUSCARRON_{{ form.name|upper }}_ROOM={{ form.room|default('') }}
|
||||
BUSCARRON_{{ form.name|upper }}_REDIRECT={{ form.redirect|default('') }}
|
||||
BUSCARRON_{{ form.name|upper }}_RATELIMIT={{ form.ratelimit|default('') }}
|
||||
BUSCARRON_{{ form.name|upper }}_EXTENSIONS={{ form.extensions|default('')|join(' ') }}
|
||||
{% endfor %}
|
||||
BUSCARRON_LIST={{ forms|join(" ") }}
|
||||
|
||||
{{ matrix_bot_buscarron_environment_variables_extension }}
|
@ -0,0 +1,39 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
[Unit]
|
||||
Description=Matrix web forms bot
|
||||
{% for service in matrix_bot_buscarron_systemd_required_services_list %}
|
||||
Requires={{ service }}
|
||||
After={{ service }}
|
||||
{% endfor %}
|
||||
{% for service in matrix_bot_buscarron_systemd_wanted_services_list %}
|
||||
Wants={{ service }}
|
||||
{% endfor %}
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="HOME={{ matrix_systemd_unit_home_path }}"
|
||||
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-buscarron 2>/dev/null || true'
|
||||
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-buscarron 2>/dev/null || true'
|
||||
|
||||
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-buscarron \
|
||||
--log-driver=none \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--read-only \
|
||||
--network={{ matrix_docker_network }} \
|
||||
--env-file={{ matrix_bot_buscarron_config_path }}/env \
|
||||
--mount type=bind,src={{ matrix_bot_buscarron_data_path }},dst=/data \
|
||||
{% for arg in matrix_bot_buscarron_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_bot_buscarron_docker_image }}
|
||||
|
||||
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-buscarron 2>/dev/null || true'
|
||||
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-buscarron 2>/dev/null || true'
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
SyslogIdentifier=matrix-bot-buscarron
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -70,7 +70,7 @@
|
||||
force_source: "{{ matrix_mautrix_signal_daemon_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_mautrix_signal_daemon_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
dockerfile: Containerfile
|
||||
path: "{{ matrix_mautrix_signal_daemon_docker_src_files_path }}"
|
||||
pull: true
|
||||
when: "matrix_mautrix_signal_daemon_container_image_self_build|bool"
|
||||
|
@ -118,6 +118,8 @@ matrix_mautrix_telegram_configuration_extension: "{{ matrix_mautrix_telegram_con
|
||||
# You most likely don't need to touch this variable. Instead, see `matrix_mautrix_telegram_configuration_yaml`.
|
||||
matrix_mautrix_telegram_configuration: "{{ matrix_mautrix_telegram_configuration_yaml|from_yaml|combine(matrix_mautrix_telegram_configuration_extension, recursive=True) }}"
|
||||
|
||||
matrix_mautrix_telegram_sender_localpart: "telegrambot"
|
||||
|
||||
matrix_mautrix_telegram_registration_yaml: |
|
||||
id: telegram
|
||||
as_token: "{{ matrix_mautrix_telegram_appservice_token }}"
|
||||
@ -131,11 +133,11 @@ matrix_mautrix_telegram_registration_yaml: |
|
||||
aliases:
|
||||
- exclusive: true
|
||||
regex: '^#telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$'
|
||||
# See https://github.com/mautrix/signal/issues/43
|
||||
sender_localpart: _bot_{{ matrix_mautrix_telegram_appservice_bot_username }}
|
||||
url: {{ matrix_mautrix_telegram_appservice_address }}
|
||||
rate_limited: false
|
||||
de.sorunome.msc2409.push_ephemeral: true
|
||||
# sender_localpart: "bridges_{{ matrix_mautrix_telegram_sender_localpart }}"
|
||||
|
||||
matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml|from_yaml }}"
|
||||
|
||||
|
@ -25,7 +25,7 @@ presence:
|
||||
# Bridge Discord online/offline status
|
||||
enabled: true
|
||||
# How often to send status to the homeserver in milliseconds
|
||||
interval: 500
|
||||
interval: 10000
|
||||
|
||||
provisioning:
|
||||
# Regex of Matrix IDs allowed to use the puppet bridge
|
||||
@ -70,7 +70,7 @@ namePatterns:
|
||||
#
|
||||
# name: username of the user
|
||||
# discriminator: hashtag of the user (ex. #1234)
|
||||
user: :name
|
||||
user: ":name (#:discriminator) (via Discord)"
|
||||
|
||||
# A user's guild-specific displayname - if they've set a custom nick in
|
||||
# a guild
|
||||
@ -82,7 +82,7 @@ namePatterns:
|
||||
# displayname: the user's custom group-specific nick
|
||||
# channel: the name of the channel
|
||||
# guild: the name of the guild
|
||||
userOverride: :name
|
||||
userOverride: ":displayname (:name#:discriminator) (via Discord)"
|
||||
|
||||
# Room names for bridged Discord channels
|
||||
#
|
||||
@ -90,7 +90,7 @@ namePatterns:
|
||||
#
|
||||
# name: name of the channel
|
||||
# guild: name of the guild
|
||||
room: :name
|
||||
room: "#:name (:guild on Discord)"
|
||||
|
||||
# Group names for bridged Discord servers
|
||||
#
|
||||
|
@ -9,7 +9,7 @@ matrix_client_element_container_image_self_build_repo: "https://github.com/vecto
|
||||
# - https://github.com/vector-im/element-web/issues/19544
|
||||
matrix_client_element_container_image_self_build_low_memory_system_patch_enabled: "{{ ansible_memtotal_mb < 4096 }}"
|
||||
|
||||
matrix_client_element_version: v1.10.10
|
||||
matrix_client_element_version: v1.10.11
|
||||
matrix_client_element_docker_image: "{{ matrix_client_element_docker_image_name_prefix }}vectorim/element-web:{{ matrix_client_element_version }}"
|
||||
matrix_client_element_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_element_container_image_self_build else matrix_container_global_registry_prefix }}"
|
||||
matrix_client_element_docker_image_force_pull: "{{ matrix_client_element_docker_image.endswith(':latest') }}"
|
||||
|
BIN
roles/matrix-client-element/files/antifa_coffee_cups.png
Normal file
BIN
roles/matrix-client-element/files/antifa_coffee_cups.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 188 KiB |
BIN
roles/matrix-client-element/files/background.jpg
Normal file
BIN
roles/matrix-client-element/files/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
BIN
roles/matrix-client-element/files/background_small.jpg
Normal file
BIN
roles/matrix-client-element/files/background_small.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 747 KiB |
@ -82,6 +82,18 @@
|
||||
- {src: "{{ matrix_client_element_embedded_pages_home_path }}", name: "home.html"}
|
||||
when: "item.src is not none"
|
||||
|
||||
- name: Copy Element costum files
|
||||
copy:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ matrix_client_element_data_path }}/{{ item.name }}"
|
||||
mode: 0644
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- {src: "{{ role_path }}/files/background.jpg", name: "background.jpg"}
|
||||
- {src: "{{ role_path }}/files/antifa_coffee_cups.png", name: "logo.png"}
|
||||
when: "matrix_client_element_enabled|bool and item.src is not none"
|
||||
|
||||
- name: Ensure Element config files removed
|
||||
file:
|
||||
path: "{{ matrix_client_element_data_path }}/{{ item.name }}"
|
||||
|
@ -33,7 +33,7 @@ h1::after {
|
||||
}
|
||||
|
||||
.mx_Logo {
|
||||
height: 54px;
|
||||
height: 92px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ matrix_dendrite_systemd_wanted_services_list: []
|
||||
# Specifies which template files to use when configuring Dendrite.
|
||||
# If you'd like to have your own different configuration, feel free to copy and paste
|
||||
# the original files into your inventory (e.g. in `inventory/host_vars/<host>/`)
|
||||
# and then change the specific host's `vars.yaml` file like this:
|
||||
# and then change the specific host's `vars.yml` file like this:
|
||||
# matrix_dendrite_template_dendrite_config: "{{ playbook_dir }}/inventory/host_vars/<host>/dendrite.yaml.j2"
|
||||
matrix_dendrite_template_dendrite_config: "{{ role_path }}/templates/dendrite/dendrite.yaml.j2"
|
||||
|
||||
|
@ -159,6 +159,10 @@ matrix_nginx_proxy_proxy_hydrogen_hostname: "{{ matrix_server_fqn_hydrogen }}"
|
||||
matrix_nginx_proxy_proxy_cinny_enabled: false
|
||||
matrix_nginx_proxy_proxy_cinny_hostname: "{{ matrix_server_fqn_cinny }}"
|
||||
|
||||
# Controls whether proxying the buscarron domain should be done.
|
||||
matrix_nginx_proxy_proxy_buscarron_enabled: false
|
||||
matrix_nginx_proxy_proxy_buscarron_hostname: "{{ matrix_server_fqn_buscarron }}"
|
||||
|
||||
# Controls whether proxying the matrix domain should be done.
|
||||
matrix_nginx_proxy_proxy_matrix_enabled: false
|
||||
matrix_nginx_proxy_proxy_matrix_hostname: "{{ matrix_server_fqn_matrix }}"
|
||||
@ -221,6 +225,7 @@ matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled: false
|
||||
# e.g. `htpasswd -c mypass.htpasswd prometheus` and enter `mysecurepw` when prompted yields `prometheus:$apr1$wZhqsn.U$7LC3kMmjUbjNAZjyMyvYv/`
|
||||
# The part after `prometheus:` is needed here. matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_key: "$apr1$wZhqsn.U$7LC3kMmjUbjNAZjyMyvYv/"
|
||||
matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_key: ""
|
||||
matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_path: "{{ matrix_nginx_proxy_data_path_in_container if matrix_nginx_proxy_enabled else matrix_nginx_proxy_data_path }}/matrix-synapse-metrics-htpasswd"
|
||||
|
||||
# The addresses where the Matrix Client API is.
|
||||
# Certain extensions (like matrix-corporal) may override this in order to capture all traffic.
|
||||
@ -303,6 +308,9 @@ matrix_nginx_proxy_proxy_hydrogen_additional_server_configuration_blocks: []
|
||||
# A list of strings containing additional configuration blocks to add to Cinny's server configuration (matrix-client-cinny.conf).
|
||||
matrix_nginx_proxy_proxy_cinny_additional_server_configuration_blocks: []
|
||||
|
||||
# A list of strings containing additional configuration blocks to add to buscarron's server configuration (matrix-bot-buscarron.conf).
|
||||
matrix_nginx_proxy_proxy_buscarron_additional_server_configuration_blocks: []
|
||||
|
||||
# A list of strings containing additional configuration blocks to add to Dimension's server configuration (matrix-dimension.conf).
|
||||
matrix_nginx_proxy_proxy_dimension_additional_server_configuration_blocks: []
|
||||
|
||||
|
@ -110,6 +110,13 @@
|
||||
mode: 0644
|
||||
when: matrix_nginx_proxy_proxy_cinny_enabled|bool
|
||||
|
||||
- name: Ensure Matrix nginx-proxy configuration for buscarron domain exists
|
||||
template:
|
||||
src: "{{ role_path }}/templates/nginx/conf.d/matrix-bot-buscarron.conf.j2"
|
||||
dest: "{{ matrix_nginx_proxy_confd_path }}/matrix-bot-buscarron.conf"
|
||||
mode: 0644
|
||||
when: matrix_nginx_proxy_proxy_buscarron_enabled|bool
|
||||
|
||||
- name: Ensure Matrix nginx-proxy configuration for dimension domain exists
|
||||
template:
|
||||
src: "{{ role_path }}/templates/nginx/conf.d/matrix-dimension.conf.j2"
|
||||
@ -259,6 +266,12 @@
|
||||
state: absent
|
||||
when: "not matrix_nginx_proxy_proxy_cinny_enabled|bool"
|
||||
|
||||
- name: Ensure Matrix nginx-proxy configuration for buscarron domain deleted
|
||||
file:
|
||||
path: "{{ matrix_nginx_proxy_confd_path }}/matrix-bot-buscarron.conf"
|
||||
state: absent
|
||||
when: "not matrix_nginx_proxy_proxy_buscarron_enabled|bool"
|
||||
|
||||
- name: Ensure Matrix nginx-proxy configuration for dimension domain deleted
|
||||
file:
|
||||
path: "{{ matrix_nginx_proxy_confd_path }}/matrix-dimension.conf"
|
||||
|
@ -0,0 +1,104 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
|
||||
{% macro render_vhost_directives() %}
|
||||
gzip on;
|
||||
gzip_types text/plain application/json application/javascript text/css image/x-icon font/ttf image/gif;
|
||||
|
||||
{% if matrix_nginx_proxy_hsts_preload_enabled %}
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
{% else %}
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
{% endif %}
|
||||
add_header X-XSS-Protection "{{ matrix_nginx_proxy_xss_protection }}";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header Content-Security-Policy "frame-ancestors 'none'";
|
||||
{% if matrix_nginx_proxy_floc_optout_enabled %}
|
||||
add_header Permissions-Policy interest-cohort=() always;
|
||||
{% endif %}
|
||||
|
||||
{% for configuration_block in matrix_nginx_proxy_proxy_buscarron_additional_server_configuration_blocks %}
|
||||
{{- configuration_block }}
|
||||
{% endfor %}
|
||||
|
||||
location / {
|
||||
{% if matrix_nginx_proxy_enabled %}
|
||||
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
||||
resolver 127.0.0.11 valid=5s;
|
||||
set $backend "matrix-bot-buscarron:8080";
|
||||
proxy_pass http://$backend;
|
||||
{% else %}
|
||||
{# Generic configuration for use outside of our container setup #}
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
{% endif %}
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For {{ matrix_nginx_proxy_x_forwarded_for }};
|
||||
}
|
||||
{% endmacro %}
|
||||
|
||||
server {
|
||||
listen {{ 8080 if matrix_nginx_proxy_enabled else 80 }};
|
||||
listen [::]:{{ 8080 if matrix_nginx_proxy_enabled else 80 }};
|
||||
|
||||
|
||||
server_name {{ matrix_nginx_proxy_proxy_buscarron_hostname }};
|
||||
|
||||
server_tokens off;
|
||||
root /dev/null;
|
||||
|
||||
{% if matrix_nginx_proxy_https_enabled %}
|
||||
location /.well-known/acme-challenge {
|
||||
{% if matrix_nginx_proxy_enabled %}
|
||||
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
||||
resolver 127.0.0.11 valid=5s;
|
||||
set $backend "matrix-certbot:8080";
|
||||
proxy_pass http://$backend;
|
||||
{% else %}
|
||||
{# Generic configuration for use outside of our container setup #}
|
||||
proxy_pass http://127.0.0.1:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }};
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$http_host$request_uri;
|
||||
}
|
||||
{% else %}
|
||||
{{ render_vhost_directives() }}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
{% if matrix_nginx_proxy_https_enabled %}
|
||||
server {
|
||||
listen {{ 8443 if matrix_nginx_proxy_enabled else 443 }} ssl http2;
|
||||
listen [::]:{{ 8443 if matrix_nginx_proxy_enabled else 443 }} ssl http2;
|
||||
|
||||
server_name {{ matrix_nginx_proxy_proxy_buscarron_hostname }};
|
||||
|
||||
server_tokens off;
|
||||
root /dev/null;
|
||||
|
||||
ssl_certificate {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_proxy_buscarron_hostname }}/fullchain.pem;
|
||||
ssl_certificate_key {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_proxy_buscarron_hostname }}/privkey.pem;
|
||||
|
||||
ssl_protocols {{ matrix_nginx_proxy_ssl_protocols }};
|
||||
{% if matrix_nginx_proxy_ssl_ciphers != "" %}
|
||||
ssl_ciphers {{ matrix_nginx_proxy_ssl_ciphers }};
|
||||
{% endif %}
|
||||
ssl_prefer_server_ciphers {{ matrix_nginx_proxy_ssl_prefer_server_ciphers }};
|
||||
|
||||
{% if matrix_nginx_proxy_ocsp_stapling_enabled %}
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
ssl_trusted_certificate {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_proxy_buscarron_hostname }}/chain.pem;
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_nginx_proxy_ssl_session_tickets_off %}
|
||||
ssl_session_tickets off;
|
||||
{% endif %}
|
||||
ssl_session_cache {{ matrix_nginx_proxy_ssl_session_cache }};
|
||||
ssl_session_timeout {{ matrix_nginx_proxy_ssl_session_timeout }};
|
||||
|
||||
{{ render_vhost_directives() }}
|
||||
}
|
||||
{% endif %}
|
@ -161,7 +161,7 @@ server {
|
||||
|
||||
{% if matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled %}
|
||||
auth_basic "protected";
|
||||
auth_basic_user_file /nginx-data/matrix-synapse-metrics-htpasswd;
|
||||
auth_basic_user_file {{ matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_path }};
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
@ -177,7 +177,7 @@ server {
|
||||
|
||||
{% if matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled %}
|
||||
auth_basic "protected";
|
||||
auth_basic_user_file /nginx-data/matrix-synapse-metrics-htpasswd;
|
||||
auth_basic_user_file {{ matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_path }};
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
|
@ -9,7 +9,7 @@ if [ $# -ne 2 ]; then
|
||||
fi
|
||||
|
||||
docker run \
|
||||
-it \
|
||||
-i \
|
||||
--rm \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
|
BIN
roles/matrix-riot-web/files/antifa_coffee_cups.png
Normal file
BIN
roles/matrix-riot-web/files/antifa_coffee_cups.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 188 KiB |
BIN
roles/matrix-riot-web/files/background.jpg
Normal file
BIN
roles/matrix-riot-web/files/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
@ -74,7 +74,7 @@ matrix_synapse_in_container_python_packages_path: "/usr/local/lib/python3.9/site
|
||||
# Specifies which template files to use when configuring Synapse.
|
||||
# If you'd like to have your own different configuration, feel free to copy and paste
|
||||
# the original files into your inventory (e.g. in `inventory/host_vars/<host>/`)
|
||||
# and then change the specific host's `vars.yaml` file like this:
|
||||
# and then change the specific host's `vars.yml` file like this:
|
||||
# matrix_synapse_template_synapse_homeserver: "{{ playbook_dir }}/inventory/host_vars/<host>/homeserver.yaml.j2"
|
||||
matrix_synapse_template_synapse_homeserver: "{{ role_path }}/templates/synapse/homeserver.yaml.j2"
|
||||
matrix_synapse_template_synapse_log: "{{ role_path }}/templates/synapse/synapse.log.config.j2"
|
||||
|
@ -19,7 +19,7 @@
|
||||
worker:
|
||||
type: 'federation_sender'
|
||||
instanceId: "{{ item }}"
|
||||
port: 0
|
||||
port: "{{ item }}"
|
||||
metrics_port: "{{ matrix_synapse_workers_federation_sender_workers_metrics_range_start + item }}"
|
||||
register: "matrix_synapse_workers_list_results_federation_sender_workers"
|
||||
loop: "{{ range(0, matrix_synapse_workers_federation_sender_workers_count|int)|list }}"
|
||||
|
@ -20,7 +20,7 @@
|
||||
with_items:
|
||||
- "matrix_synapse_workers_appservice_workers_count"
|
||||
- "matrix_synapse_workers_pusher_workers_count"
|
||||
- "matrix_synapse_workers_federation_sender_workers_count"
|
||||
# - "matrix_synapse_workers_federation_sender_workers_count"
|
||||
|
||||
- name: (Deprecation) Catch and report renamed settings
|
||||
fail:
|
||||
|
@ -2848,7 +2848,9 @@ opentracing:
|
||||
# Disables sending of outbound federation transactions on the main process.
|
||||
# Uncomment if using a federation sender worker.
|
||||
#
|
||||
#send_federation: false
|
||||
{% if matrix_synapse_workers_federation_sender_workers_count|int > 0 %}
|
||||
send_federation: false
|
||||
{% endif %}
|
||||
|
||||
# It is possible to run multiple federation sender workers, in which case the
|
||||
# work is balanced across them.
|
||||
@ -2858,8 +2860,13 @@ opentracing:
|
||||
# started, to ensure that all instances are running with the same config (otherwise
|
||||
# events may be dropped).
|
||||
#
|
||||
#federation_sender_instances:
|
||||
# - federation_sender1
|
||||
{% if matrix_synapse_workers_federation_sender_workers_count != 0%}
|
||||
federation_sender_instances:
|
||||
{% for i in range(0, matrix_synapse_workers_federation_sender_workers_count|int)|list %}
|
||||
# -dd federation_sender1
|
||||
- federation_sender:{{ i | int }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
# When using workers this should be a map from `worker_name` to the
|
||||
# HTTP replication listener of the worker, if configured.
|
||||
|
36
setup.yml
36
setup.yml
@ -7,9 +7,10 @@
|
||||
- roles/matrix-synapse/vars/workers.yml
|
||||
|
||||
roles:
|
||||
# - matrix-awx
|
||||
- matrix-base
|
||||
- matrix-dynamic-dns
|
||||
- matrix-mailer
|
||||
# - matrix-dynamic-dns
|
||||
# - matrix-mailer
|
||||
- matrix-postgres
|
||||
- matrix-redis
|
||||
- matrix-corporal
|
||||
@ -38,6 +39,7 @@
|
||||
- matrix-bridge-hookshot
|
||||
- matrix-bot-matrix-reminder-bot
|
||||
- matrix-bot-matrix-registration-bot
|
||||
- matrix-bot-buscarron
|
||||
- matrix-bot-honoroit
|
||||
- matrix-bot-go-neb
|
||||
- matrix-bot-mjolnir
|
||||
@ -64,3 +66,33 @@
|
||||
- matrix-prometheus-postgres-exporter
|
||||
- matrix-backup-borg
|
||||
- matrix-common-after
|
||||
|
||||
tasks:
|
||||
- name: Ensure web-user is present
|
||||
user:
|
||||
name: "{{ web_user }}"
|
||||
state: present
|
||||
system: yes
|
||||
register: web_user_res
|
||||
tags: [ setup-caddy, setup-all, start ]
|
||||
- name: Ensure directory for revproxy config is present
|
||||
file:
|
||||
path: "{{ revproxy_autoload_dir }}/matrix"
|
||||
state: directory
|
||||
owner: "{{ web_user_res.uid }}"
|
||||
group: "{{ web_user_res.group }}"
|
||||
mode: 0750
|
||||
tags: [ setup-caddy, setup-all, start ]
|
||||
- name: Template reverse proxy configuration
|
||||
template:
|
||||
src: Caddyfile.j2
|
||||
dest: "{{ revproxy_autoload_dir }}/matrix/Caddyfile"
|
||||
owner: "{{ web_user_res.uid }}"
|
||||
group: "{{ web_user_res.group }}"
|
||||
mode: 0640
|
||||
tags: [ setup-caddy, setup-all, start ]
|
||||
- name: Restart reverse proxy
|
||||
docker_container:
|
||||
name: web
|
||||
state: started
|
||||
restart: yes
|
||||
|
110
templates/Caddyfile.j2
Normal file
110
templates/Caddyfile.j2
Normal file
@ -0,0 +1,110 @@
|
||||
https://{{ matrix_server_fqn_matrix }} {
|
||||
tls /tls_certs/finallycoffee.eu/fullchain.pem /tls_certs/finallycoffee.eu/privkey.pem
|
||||
encode zstd gzip
|
||||
header {
|
||||
Strict-Transport-Security "max-age=31536000;"
|
||||
X-Frame-Options "DENY"
|
||||
X-XSS-Protection "1; mode=block"
|
||||
}
|
||||
basicauth /metrics/* bcrypt monitoring {
|
||||
monitoring JDJhJDE0JGdQRlNHVFpSQmRiaWlPem9LdXlkS09HN2E3LklZS05YZmtXTEY1NlFXbkMxd3hBUmwwbVZl
|
||||
}
|
||||
route /metrics/synapse {
|
||||
uri replace /metrics/synapse /_synapse/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/appservice {
|
||||
uri replace /metrics/synapse/worker/appservice /_synapse-worker-appservice-0/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/federation-sender-0 {
|
||||
uri replace /metrics/synapse/worker/federation-sender-0 /_synapse-worker-federation_sender-0/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/federation-sender-1 {
|
||||
uri replace /metrics/synapse/worker/federation-sender-1 /_synapse-worker-federation_sender-1/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/federation-sender-2 {
|
||||
uri replace /metrics/synapse/worker/federation-sender-2 /_synapse-worker-federation_sender-2/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/generic-0 {
|
||||
uri replace /metrics/synapse/worker/generic-0 /_synapse-worker-generic_worker-{{ (matrix_synapse_workers_generic_workers_port_range_start)|int}}/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/generic-1 {
|
||||
uri replace /metrics/synapse/worker/generic-1 /_synapse-worker-generic_worker-{{ (matrix_synapse_workers_generic_workers_port_range_start + 1)|int}}/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/media-0 {
|
||||
uri replace /metrics/synapse/worker/media-0 /_synapse-worker-media_repository-{{ (matrix_synapse_workers_media_repository_workers_port_range_start)|int }}/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/synapse/worker/media-1 {
|
||||
uri replace /metrics/synapse/worker/media-1 /_synapse-worker-media_repository-{{ (matrix_synapse_workers_media_repository_workers_port_range_start + 1)|int }}/metrics
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
route /metrics/bridge/* {
|
||||
uri strip_prefix /metrics/bridge
|
||||
route /mautrix-telegram {
|
||||
uri replace /mautrix-telegram /metrics
|
||||
reverse_proxy http://127.0.0.1:{{ matrix_mautrix_telegram_container_http_monitoring_host_bind_port }}
|
||||
}
|
||||
route /mautrix-whatsapp {
|
||||
uri replace /mautrix-whatsapp /metrics
|
||||
reverse_proxy http://127.0.0.1:{{ matrix_mautrix_whatsapp_container_http_monitoring_host_bind_port }}
|
||||
}
|
||||
route /mautrix-signal {
|
||||
uri replace /mautrix-signal /metrics
|
||||
reverse_proxy http://127.0.0.1:{{ matrix_mautrix_signal_container_http_monitoring_host_bind_port }}
|
||||
}
|
||||
route /mx-puppet-instagram {
|
||||
uri replace /mx-puppet-instagram /metrics
|
||||
reverse_proxy http://127.0.0.1:{{ matrix_mx_puppet_instagram_container_http_monitoring_host_bind_port }}
|
||||
}
|
||||
route /mx-puppet-discord {
|
||||
uri replace /mx-puppet-discord /metrics
|
||||
reverse_proxy http://127.0.0.1:{{ matrix_mx_puppet_discord_container_http_monitoring_host_bind_port }}
|
||||
}
|
||||
route /mx-puppet-skype {
|
||||
uri replace /mx-puppet-skype /metrics
|
||||
reverse_proxy http://127.0.0.1:{{ matrix_mx_puppet_skype_container_http_monitoring_host_bind_port }}
|
||||
}
|
||||
route /mx-puppet-slack {
|
||||
uri replace /mx-puppet-slack /metrics
|
||||
reverse_proxy http://127.0.0.1:{{ matrix_mx_puppet_slack_container_http_monitoring_host_bind_port }}
|
||||
}
|
||||
}
|
||||
reverse_proxy /_matrix/federation/* http://{{ matrix_nginx_proxy_container_federation_host_bind_port }}
|
||||
reverse_proxy /_matrix/key/* http://{{ matrix_nginx_proxy_container_federation_host_bind_port }}
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
|
||||
https://{{ matrix_server_fqn_dimension }} {
|
||||
tls /tls_certs/finallycoffee.eu/fullchain.pem /tls_certs/finallycoffee.eu/privkey.pem
|
||||
encode zstd gzip
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
|
||||
https://{{ matrix_server_fqn_element }} {
|
||||
tls /tls_certs/chat.finallycoffee.eu/fullchain.pem /tls_certs/chat.finallycoffee.eu/privkey.pem
|
||||
encode zstd gzip
|
||||
reverse_proxy * http://{{ matrix_nginx_proxy_container_http_host_bind_port }}
|
||||
}
|
||||
|
||||
https://{{ matrix_domain }}/.well-known/matrix/* {
|
||||
tls /tls_certs/finallycoffee.eu/fullchain.pem /tls_certs/finallycoffee.eu/privkey.pem
|
||||
route {
|
||||
uri strip_prefix /.well-known/matrix
|
||||
root * /matrix_static
|
||||
file_server
|
||||
}
|
||||
header {
|
||||
Content-Type "application/json"
|
||||
X-Content-Type-Options "nosniff"
|
||||
Access-Control-Allow-Origin *
|
||||
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user