mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-07-16 19:53:53 +03:00
Rename matrix_mautrix_wsproxy_* variables to matrix_bridge_mautrix_wsproxy_*
Part of adopting a uniform naming policy for bridge variables, where the variable prefix matches the role directory name. The companion appservice variables defined by this role are folded under the role prefix as well: matrix_mautrix_androidsms_* becomes matrix_bridge_mautrix_wsproxy_androidsms_* and matrix_mautrix_imessage_* becomes matrix_bridge_mautrix_wsproxy_imessage_*. matrix_mautrix_signal_wsproxy_syncproxy_connection_string becomes matrix_bridge_mautrix_wsproxy_syncproxy_connection_string, aligning it with the sibling matrix_bridge_mautrix_wsproxy_syncproxy_* variables. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,26 +25,26 @@ When setting, replace `example.com` with your own.
|
|||||||
To enable the bridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
To enable the bridge, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matrix_mautrix_wsproxy_enabled: true
|
matrix_bridge_mautrix_wsproxy_enabled: true
|
||||||
|
|
||||||
matrix_mautrix_androidsms_appservice_token: 'secret token from bridge'
|
matrix_bridge_mautrix_wsproxy_androidsms_appservice_token: 'secret token from bridge'
|
||||||
matrix_mautrix_androidsms_homeserver_token: 'secret token from bridge'
|
matrix_bridge_mautrix_wsproxy_androidsms_homeserver_token: 'secret token from bridge'
|
||||||
matrix_mautrix_imessage_appservice_token: 'secret token from bridge'
|
matrix_bridge_mautrix_wsproxy_imessage_appservice_token: 'secret token from bridge'
|
||||||
matrix_mautrix_imessage_homeserver_token: 'secret token from bridge'
|
matrix_bridge_mautrix_wsproxy_imessage_homeserver_token: 'secret token from bridge'
|
||||||
matrix_mautrix_wsproxy_syncproxy_shared_secret: 'secret token from bridge'
|
matrix_bridge_mautrix_wsproxy_syncproxy_shared_secret: 'secret token from bridge'
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the tokens must match what is compiled into the [mautrix-imessage](https://github.com/mautrix/imessage) bridge running on your Mac or Android device.
|
Note that the tokens must match what is compiled into the [mautrix-imessage](https://github.com/mautrix/imessage) bridge running on your Mac or Android device.
|
||||||
|
|
||||||
### Adjusting the wsproxy URL (optional)
|
### Adjusting the wsproxy URL (optional)
|
||||||
|
|
||||||
By tweaking the `matrix_mautrix_wsproxy_hostname` variable, you can easily make the service available at a **different hostname** than the default one.
|
By tweaking the `matrix_bridge_mautrix_wsproxy_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:
|
Example additional configuration for your `vars.yml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Change the default hostname
|
# Change the default hostname
|
||||||
matrix_mautrix_wsproxy_hostname: ws.example.com
|
matrix_bridge_mautrix_wsproxy_hostname: ws.example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
After changing the domain, **you may need to adjust your DNS** records to point the wsproxy domain to the Matrix server.
|
After changing the domain, **you may need to adjust your DNS** records to point the wsproxy domain to the Matrix server.
|
||||||
|
|||||||
+30
-30
@@ -136,9 +136,9 @@ matrix_homeserver_container_extra_arguments_auto: |
|
|||||||
+
|
+
|
||||||
(['--mount type=bind,src=' + matrix_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_mautrix_whatsapp_enabled else [])
|
(['--mount type=bind,src=' + matrix_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_mautrix_whatsapp_enabled else [])
|
||||||
+
|
+
|
||||||
(['--mount type=bind,src=' + matrix_mautrix_wsproxy_config_path + '/androidsms-registration.yaml,dst=/matrix-mautrix-androidsms-registration.yaml,ro'] if matrix_mautrix_wsproxy_enabled else [])
|
(['--mount type=bind,src=' + matrix_bridge_mautrix_wsproxy_config_path + '/androidsms-registration.yaml,dst=/matrix-mautrix-androidsms-registration.yaml,ro'] if matrix_bridge_mautrix_wsproxy_enabled else [])
|
||||||
+
|
+
|
||||||
(['--mount type=bind,src=' + matrix_mautrix_wsproxy_config_path + '/imessage-registration.yaml,dst=/matrix-mautrix-imessage-registration.yaml,ro'] if matrix_mautrix_wsproxy_enabled else [])
|
(['--mount type=bind,src=' + matrix_bridge_mautrix_wsproxy_config_path + '/imessage-registration.yaml,dst=/matrix-mautrix-imessage-registration.yaml,ro'] if matrix_bridge_mautrix_wsproxy_enabled else [])
|
||||||
+
|
+
|
||||||
(['--mount type=bind,src=' + matrix_mx_puppet_groupme_config_path + '/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro'] if matrix_mx_puppet_groupme_enabled else [])
|
(['--mount type=bind,src=' + matrix_mx_puppet_groupme_config_path + '/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro'] if matrix_mx_puppet_groupme_enabled else [])
|
||||||
+
|
+
|
||||||
@@ -195,9 +195,9 @@ matrix_homeserver_app_service_config_files_auto: |
|
|||||||
+
|
+
|
||||||
(['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_mautrix_whatsapp_enabled else [])
|
(['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_mautrix_whatsapp_enabled else [])
|
||||||
+
|
+
|
||||||
(['/matrix-mautrix-androidsms-registration.yaml'] if matrix_mautrix_wsproxy_enabled else [])
|
(['/matrix-mautrix-androidsms-registration.yaml'] if matrix_bridge_mautrix_wsproxy_enabled else [])
|
||||||
+
|
+
|
||||||
(['/matrix-mautrix-imessage-registration.yaml'] if matrix_mautrix_wsproxy_enabled else [])
|
(['/matrix-mautrix-imessage-registration.yaml'] if matrix_bridge_mautrix_wsproxy_enabled else [])
|
||||||
+
|
+
|
||||||
(['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_mx_puppet_groupme_enabled else [])
|
(['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_mx_puppet_groupme_enabled else [])
|
||||||
+
|
+
|
||||||
@@ -506,16 +506,16 @@ devture_systemd_service_manager_services_list_auto: |
|
|||||||
([{
|
([{
|
||||||
'name': 'matrix-mautrix-wsproxy.service',
|
'name': 'matrix-mautrix-wsproxy.service',
|
||||||
'priority': 2000,
|
'priority': 2000,
|
||||||
'restart_necessary': (matrix_mautrix_wsproxy_restart_necessary | bool),
|
'restart_necessary': (matrix_bridge_mautrix_wsproxy_restart_necessary | bool),
|
||||||
'groups': ['matrix', 'bridges', 'mautrix-wsproxy'],
|
'groups': ['matrix', 'bridges', 'mautrix-wsproxy'],
|
||||||
}] if matrix_mautrix_wsproxy_enabled else [])
|
}] if matrix_bridge_mautrix_wsproxy_enabled else [])
|
||||||
+
|
+
|
||||||
([{
|
([{
|
||||||
'name': 'matrix-mautrix-wsproxy-syncproxy.service',
|
'name': 'matrix-mautrix-wsproxy-syncproxy.service',
|
||||||
'priority': 2000,
|
'priority': 2000,
|
||||||
'restart_necessary': (matrix_mautrix_wsproxy_syncproxy_restart_necessary | bool),
|
'restart_necessary': (matrix_bridge_mautrix_wsproxy_syncproxy_restart_necessary | bool),
|
||||||
'groups': ['matrix', 'bridges', 'mautrix-wsproxy-syncproxy'],
|
'groups': ['matrix', 'bridges', 'mautrix-wsproxy-syncproxy'],
|
||||||
}] if matrix_mautrix_wsproxy_enabled else [])
|
}] if matrix_bridge_mautrix_wsproxy_enabled else [])
|
||||||
+
|
+
|
||||||
([{
|
([{
|
||||||
'name': 'matrix-mx-puppet-groupme.service',
|
'name': 'matrix-mx-puppet-groupme.service',
|
||||||
@@ -2298,43 +2298,43 @@ matrix_mautrix_gvoice_database_password: "{{ (matrix_homeserver_generic_secret_k
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
# We don't enable bridges by default.
|
# We don't enable bridges by default.
|
||||||
matrix_mautrix_wsproxy_enabled: false
|
matrix_bridge_mautrix_wsproxy_enabled: false
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_systemd_required_services_list_default: |
|
matrix_bridge_mautrix_wsproxy_systemd_required_services_list_default: |
|
||||||
{{
|
{{
|
||||||
matrix_addons_homeserver_systemd_services_list
|
matrix_addons_homeserver_systemd_services_list
|
||||||
+
|
+
|
||||||
([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname) else [])
|
([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname) else [])
|
||||||
}}
|
}}
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
|
matrix_bridge_mautrix_wsproxy_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_hostname: "wsproxy.{{ matrix_mautrix_wsproxy_homeserver_domain }}"
|
matrix_bridge_mautrix_wsproxy_hostname: "wsproxy.{{ matrix_bridge_mautrix_wsproxy_homeserver_domain }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_syncproxy_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
|
matrix_bridge_mautrix_wsproxy_syncproxy_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_wsproxy_container_image_registry_prefix_upstream_default }}"
|
matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream_default }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_container_network: "{{ matrix_addons_container_network }}"
|
matrix_bridge_mautrix_wsproxy_container_network: "{{ matrix_addons_container_network }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_container_additional_networks: |
|
matrix_bridge_mautrix_wsproxy_container_additional_networks: |
|
||||||
{{
|
{{
|
||||||
(
|
(
|
||||||
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
|
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
|
||||||
+
|
+
|
||||||
([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
|
([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
|
||||||
+
|
+
|
||||||
([postgres_container_network] if (postgres_enabled and matrix_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_mautrix_wsproxy_container_network) else [])
|
([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_bridge_mautrix_wsproxy_container_network) else [])
|
||||||
) | unique
|
) | unique
|
||||||
}}
|
}}
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_password: "{{ (matrix_homeserver_generic_secret_key + ':wsproxy.db') | hash('sha512') | to_uuid }}"
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_password: "{{ (matrix_homeserver_generic_secret_key + ':wsproxy.db') | hash('sha512') | to_uuid }}"
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
@@ -4207,10 +4207,10 @@ postgres_managed_databases_auto: |
|
|||||||
}] if (matrix_mautrix_meta_instagram_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres' and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
|
}] if (matrix_mautrix_meta_instagram_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres' and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
|
||||||
+
|
+
|
||||||
([{
|
([{
|
||||||
'name': matrix_mautrix_wsproxy_syncproxy_database_name,
|
'name': matrix_bridge_mautrix_wsproxy_syncproxy_database_name,
|
||||||
'username': matrix_mautrix_wsproxy_syncproxy_database_username,
|
'username': matrix_bridge_mautrix_wsproxy_syncproxy_database_username,
|
||||||
'password': matrix_mautrix_wsproxy_syncproxy_database_password,
|
'password': matrix_bridge_mautrix_wsproxy_syncproxy_database_password,
|
||||||
}] if (matrix_mautrix_wsproxy_enabled and matrix_mautrix_wsproxy_syncproxy_database_engine == 'postgres' and matrix_mautrix_wsproxy_syncproxy_database_hostname == 'matrix-postgres') else [])
|
}] if (matrix_bridge_mautrix_wsproxy_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_engine == 'postgres' and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == 'matrix-postgres') else [])
|
||||||
+
|
+
|
||||||
([{
|
([{
|
||||||
'name': matrix_mautrix_telegram_database_name,
|
'name': matrix_mautrix_telegram_database_name,
|
||||||
@@ -5186,9 +5186,9 @@ matrix_ketesa_config_asManagedUsers_auto: |
|
|||||||
] if matrix_mautrix_whatsapp_enabled else [])
|
] if matrix_mautrix_whatsapp_enabled else [])
|
||||||
+
|
+
|
||||||
([
|
([
|
||||||
'^@'+(matrix_mautrix_imessage_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
|
'^@'+(matrix_bridge_mautrix_wsproxy_imessage_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
|
||||||
'^@imessage_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
|
'^@imessage_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
|
||||||
] if matrix_mautrix_wsproxy_enabled else [])
|
] if matrix_bridge_mautrix_wsproxy_enabled else [])
|
||||||
+
|
+
|
||||||
([
|
([
|
||||||
'^@_groupmepuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
|
'^@_groupmepuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
|
||||||
|
|||||||
@@ -9,175 +9,175 @@
|
|||||||
# mautrix-wsproxy is a Matrix <-> websocket bridge
|
# mautrix-wsproxy is a Matrix <-> websocket bridge
|
||||||
# See: https://github.com/mautrix/wsproxy
|
# See: https://github.com/mautrix/wsproxy
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_enabled: true
|
matrix_bridge_mautrix_wsproxy_enabled: true
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_version: latest
|
matrix_bridge_mautrix_wsproxy_version: latest
|
||||||
# See: https://mau.dev/mautrix/wsproxy/container_registry
|
# See: https://mau.dev/mautrix/wsproxy/container_registry
|
||||||
matrix_mautrix_wsproxy_container_image: "{{ matrix_mautrix_wsproxy_container_image_registry_prefix }}mautrix/wsproxy:{{ matrix_mautrix_wsproxy_version }}"
|
matrix_bridge_mautrix_wsproxy_container_image: "{{ matrix_bridge_mautrix_wsproxy_container_image_registry_prefix }}mautrix/wsproxy:{{ matrix_bridge_mautrix_wsproxy_version }}"
|
||||||
matrix_mautrix_wsproxy_container_image_registry_prefix: "{{ matrix_mautrix_wsproxy_container_image_registry_prefix_upstream }}"
|
matrix_bridge_mautrix_wsproxy_container_image_registry_prefix: "{{ matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream }}"
|
||||||
matrix_mautrix_wsproxy_container_image_registry_prefix_upstream: "{{ matrix_mautrix_wsproxy_container_image_registry_prefix_upstream_default }}"
|
matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream: "{{ matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_mautrix_wsproxy_container_image_registry_prefix_upstream_default: "dock.mau.dev/"
|
matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream_default: "dock.mau.dev/"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_base_path: "{{ matrix_base_data_path }}/wsproxy"
|
matrix_bridge_mautrix_wsproxy_base_path: "{{ matrix_base_data_path }}/wsproxy"
|
||||||
matrix_mautrix_wsproxy_config_path: "{{ matrix_mautrix_wsproxy_base_path }}/config"
|
matrix_bridge_mautrix_wsproxy_config_path: "{{ matrix_bridge_mautrix_wsproxy_base_path }}/config"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_homeserver_address: ""
|
matrix_bridge_mautrix_wsproxy_homeserver_address: ""
|
||||||
matrix_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}"
|
matrix_bridge_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_bind_port: false
|
matrix_bridge_mautrix_wsproxy_bind_port: false
|
||||||
matrix_mautrix_wsproxy_port: 29331
|
matrix_bridge_mautrix_wsproxy_port: 29331
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_appservice_address: "http://matrix-mautrix-wsproxy:{{ matrix_mautrix_wsproxy_port }}"
|
matrix_bridge_mautrix_wsproxy_appservice_address: "http://matrix-mautrix-wsproxy:{{ matrix_bridge_mautrix_wsproxy_port }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_hostname: ""
|
matrix_bridge_mautrix_wsproxy_hostname: ""
|
||||||
|
|
||||||
# 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_mautrix_wsproxy_container_network: matrix-mautrix-wsproxy
|
matrix_bridge_mautrix_wsproxy_container_network: matrix-mautrix-wsproxy
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_twitter_container_additional_networks: "{{ matrix_mautrix_wsproxy_twitter_container_additional_networks_auto + matrix_mautrix_wsproxy_twitter_container_additional_networks_custom }}"
|
matrix_bridge_mautrix_wsproxy_twitter_container_additional_networks: "{{ matrix_bridge_mautrix_wsproxy_twitter_container_additional_networks_auto + matrix_bridge_mautrix_wsproxy_twitter_container_additional_networks_custom }}"
|
||||||
matrix_mautrix_wsproxy_twitter_container_additional_networks_auto: []
|
matrix_bridge_mautrix_wsproxy_twitter_container_additional_networks_auto: []
|
||||||
matrix_mautrix_wsproxy_twitter_container_additional_networks_custom: []
|
matrix_bridge_mautrix_wsproxy_twitter_container_additional_networks_custom: []
|
||||||
|
|
||||||
# matrix_mautrix_wsproxy_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
|
# matrix_bridge_mautrix_wsproxy_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
|
||||||
# See `../templates/labels.j2` for details.
|
# See `../templates/labels.j2` for details.
|
||||||
#
|
#
|
||||||
# To inject your own other container labels, see `matrix_mautrix_wsproxy_container_labels_additional_labels`.
|
# To inject your own other container labels, see `matrix_bridge_mautrix_wsproxy_container_labels_additional_labels`.
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_enabled: true
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_enabled: true
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_mautrix_wsproxy_container_network }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_bridge_mautrix_wsproxy_container_network }}"
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_hostname: "{{ matrix_mautrix_wsproxy_hostname }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_hostname: "{{ matrix_bridge_mautrix_wsproxy_hostname }}"
|
||||||
# The path prefix must either be `/` or not end with a slash (e.g. `/wsproxy`).
|
# The path prefix must either be `/` or not end with a slash (e.g. `/wsproxy`).
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_rule: "Host(`{{ matrix_mautrix_wsproxy_container_labels_traefik_hostname }}`)"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_rule: "Host(`{{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_hostname }}`)"
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_priority: 0
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_priority: 0
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_entrypoints: web-secure
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_entrypoints: web-secure
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_tls: "{{ matrix_mautrix_wsproxy_container_labels_traefik_entrypoints != 'web' }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls: "{{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_entrypoints != 'web' }}"
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_tls_certResolver: default # noqa var-naming
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls_certResolver: default # noqa var-naming
|
||||||
|
|
||||||
# Controls which additional headers to attach to all HTTP responses.
|
# Controls which additional headers to attach to all HTTP responses.
|
||||||
# To add your own headers, use `matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom`
|
# To add your own headers, use `matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom`
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto: {}
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto: {}
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom: {}
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom: {}
|
||||||
matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers: "{{ matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto | combine(matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom) }}"
|
matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers: "{{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers_auto | combine(matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers_custom) }}"
|
||||||
|
|
||||||
# matrix_mautrix_wsproxy_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
|
# matrix_bridge_mautrix_wsproxy_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
|
||||||
# See `../templates/labels.j2` for details.
|
# See `../templates/labels.j2` for details.
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# matrix_mautrix_wsproxy_container_labels_additional_labels: |
|
# matrix_bridge_mautrix_wsproxy_container_labels_additional_labels: |
|
||||||
# my.label=1
|
# my.label=1
|
||||||
# another.label="here"
|
# another.label="here"
|
||||||
matrix_mautrix_wsproxy_container_labels_additional_labels: ''
|
matrix_bridge_mautrix_wsproxy_container_labels_additional_labels: ''
|
||||||
|
|
||||||
# A list of extra arguments to pass to the container
|
# A list of extra arguments to pass to the container
|
||||||
matrix_mautrix_wsproxy_container_extra_arguments: []
|
matrix_bridge_mautrix_wsproxy_container_extra_arguments: []
|
||||||
|
|
||||||
# List of systemd services that matrix-mautrix-wsproxy.service depends on.
|
# List of systemd services that matrix-mautrix-wsproxy.service depends on.
|
||||||
matrix_mautrix_wsproxy_systemd_required_services_list: "{{ matrix_mautrix_wsproxy_systemd_required_services_list_default + matrix_mautrix_wsproxy_systemd_required_services_list_auto + matrix_mautrix_wsproxy_systemd_required_services_list_custom }}"
|
matrix_bridge_mautrix_wsproxy_systemd_required_services_list: "{{ matrix_bridge_mautrix_wsproxy_systemd_required_services_list_default + matrix_bridge_mautrix_wsproxy_systemd_required_services_list_auto + matrix_bridge_mautrix_wsproxy_systemd_required_services_list_custom }}"
|
||||||
matrix_mautrix_wsproxy_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
|
matrix_bridge_mautrix_wsproxy_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
|
||||||
matrix_mautrix_wsproxy_systemd_required_services_list_auto: []
|
matrix_bridge_mautrix_wsproxy_systemd_required_services_list_auto: []
|
||||||
matrix_mautrix_wsproxy_systemd_required_services_list_custom: []
|
matrix_bridge_mautrix_wsproxy_systemd_required_services_list_custom: []
|
||||||
|
|
||||||
# List of systemd services that matrix-mautrix-wsproxy.service wants
|
# List of systemd services that matrix-mautrix-wsproxy.service wants
|
||||||
matrix_mautrix_wsproxy_systemd_wanted_services_list: []
|
matrix_bridge_mautrix_wsproxy_systemd_wanted_services_list: []
|
||||||
|
|
||||||
matrix_mautrix_androidsms_appservice_token: ''
|
matrix_bridge_mautrix_wsproxy_androidsms_appservice_token: ''
|
||||||
matrix_mautrix_androidsms_homeserver_token: ''
|
matrix_bridge_mautrix_wsproxy_androidsms_homeserver_token: ''
|
||||||
|
|
||||||
matrix_mautrix_imessage_appservice_token: ''
|
matrix_bridge_mautrix_wsproxy_imessage_appservice_token: ''
|
||||||
matrix_mautrix_imessage_homeserver_token: ''
|
matrix_bridge_mautrix_wsproxy_imessage_homeserver_token: ''
|
||||||
|
|
||||||
matrix_mautrix_androidsms_appservice_bot_username: androidsmsbot
|
matrix_bridge_mautrix_wsproxy_androidsms_appservice_bot_username: androidsmsbot
|
||||||
matrix_mautrix_imessage_appservice_bot_username: imessagebot
|
matrix_bridge_mautrix_wsproxy_imessage_appservice_bot_username: imessagebot
|
||||||
|
|
||||||
# Default mautrix-wsproxy configuration template which covers the generic use case.
|
# Default mautrix-wsproxy configuration template which covers the generic use case.
|
||||||
# You can customize it by controlling the various variables inside it.
|
# You can customize it by controlling the various variables inside it.
|
||||||
#
|
#
|
||||||
# For a more advanced customization, you can extend the default (see `matrix_mautrix_wsproxy_configuration_extension_yaml`)
|
# For a more advanced customization, you can extend the default (see `matrix_bridge_mautrix_wsproxy_configuration_extension_yaml`)
|
||||||
# or completely replace this variable with your own template.
|
# or completely replace this variable with your own template.
|
||||||
matrix_mautrix_wsproxy_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
|
matrix_bridge_mautrix_wsproxy_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_configuration_extension_yaml: |
|
matrix_bridge_mautrix_wsproxy_configuration_extension_yaml: |
|
||||||
# Your custom YAML configuration goes here.
|
# Your custom YAML configuration goes here.
|
||||||
# This configuration extends the default starting configuration (`matrix_mautrix_wsproxy_configuration_yaml`).
|
# This configuration extends the default starting configuration (`matrix_bridge_mautrix_wsproxy_configuration_yaml`).
|
||||||
#
|
#
|
||||||
# You can override individual variables from the default configuration, or introduce new ones.
|
# You can override individual variables from the default configuration, or introduce new ones.
|
||||||
#
|
#
|
||||||
# If you need something more special, you can take full control by
|
# If you need something more special, you can take full control by
|
||||||
# completely redefining `matrix_mautrix_wsproxy_configuration_yaml`.
|
# completely redefining `matrix_bridge_mautrix_wsproxy_configuration_yaml`.
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_configuration_extension: "{{ matrix_mautrix_wsproxy_configuration_extension_yaml | from_yaml if matrix_mautrix_wsproxy_configuration_extension_yaml | from_yaml is mapping else {} }}"
|
matrix_bridge_mautrix_wsproxy_configuration_extension: "{{ matrix_bridge_mautrix_wsproxy_configuration_extension_yaml | from_yaml if matrix_bridge_mautrix_wsproxy_configuration_extension_yaml | from_yaml is mapping else {} }}"
|
||||||
|
|
||||||
# Holds the final configuration (a combination of the default and its extension).
|
# Holds the final configuration (a combination of the default and its extension).
|
||||||
# You most likely don't need to touch this variable. Instead, see `matrix_mautrix_wsproxy_configuration_yaml`.
|
# You most likely don't need to touch this variable. Instead, see `matrix_bridge_mautrix_wsproxy_configuration_yaml`.
|
||||||
matrix_mautrix_wsproxy_configuration: "{{ matrix_mautrix_wsproxy_configuration_yaml | from_yaml | combine(matrix_mautrix_wsproxy_configuration_extension, recursive=True) }}"
|
matrix_bridge_mautrix_wsproxy_configuration: "{{ matrix_bridge_mautrix_wsproxy_configuration_yaml | from_yaml | combine(matrix_bridge_mautrix_wsproxy_configuration_extension, recursive=True) }}"
|
||||||
|
|
||||||
matrix_mautrix_androidsms_registration_yaml: |
|
matrix_bridge_mautrix_wsproxy_androidsms_registration_yaml: |
|
||||||
id: androidsms
|
id: androidsms
|
||||||
url: {{ matrix_mautrix_wsproxy_appservice_address }}
|
url: {{ matrix_bridge_mautrix_wsproxy_appservice_address }}
|
||||||
as_token: "{{ matrix_mautrix_androidsms_appservice_token }}"
|
as_token: "{{ matrix_bridge_mautrix_wsproxy_androidsms_appservice_token }}"
|
||||||
hs_token: "{{ matrix_mautrix_androidsms_homeserver_token }}"
|
hs_token: "{{ matrix_bridge_mautrix_wsproxy_androidsms_homeserver_token }}"
|
||||||
sender_localpart: _bot_{{ matrix_mautrix_androidsms_appservice_bot_username }}
|
sender_localpart: _bot_{{ matrix_bridge_mautrix_wsproxy_androidsms_appservice_bot_username }}
|
||||||
rate_limited: false
|
rate_limited: false
|
||||||
namespaces:
|
namespaces:
|
||||||
users:
|
users:
|
||||||
- regex: '@androidsms_.+:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
- regex: '@androidsms_.+:{{ matrix_bridge_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
||||||
exclusive: true
|
exclusive: true
|
||||||
- exclusive: true
|
- exclusive: true
|
||||||
regex: '^@{{ matrix_mautrix_androidsms_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
regex: '^@{{ matrix_bridge_mautrix_wsproxy_androidsms_appservice_bot_username | regex_escape }}:{{ matrix_bridge_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
||||||
|
|
||||||
matrix_mautrix_androidsms_registration: "{{ matrix_mautrix_androidsms_registration_yaml | from_yaml }}"
|
matrix_bridge_mautrix_wsproxy_androidsms_registration: "{{ matrix_bridge_mautrix_wsproxy_androidsms_registration_yaml | from_yaml }}"
|
||||||
|
|
||||||
matrix_mautrix_imessage_registration_yaml: |
|
matrix_bridge_mautrix_wsproxy_imessage_registration_yaml: |
|
||||||
id: imessage
|
id: imessage
|
||||||
url: {{ matrix_mautrix_wsproxy_appservice_address }}
|
url: {{ matrix_bridge_mautrix_wsproxy_appservice_address }}
|
||||||
as_token: "{{ matrix_mautrix_imessage_appservice_token }}"
|
as_token: "{{ matrix_bridge_mautrix_wsproxy_imessage_appservice_token }}"
|
||||||
hs_token: "{{ matrix_mautrix_imessage_homeserver_token }}"
|
hs_token: "{{ matrix_bridge_mautrix_wsproxy_imessage_homeserver_token }}"
|
||||||
sender_localpart: _bot_{{ matrix_mautrix_imessage_appservice_bot_username }}
|
sender_localpart: _bot_{{ matrix_bridge_mautrix_wsproxy_imessage_appservice_bot_username }}
|
||||||
rate_limited: false
|
rate_limited: false
|
||||||
namespaces:
|
namespaces:
|
||||||
users:
|
users:
|
||||||
- regex: '@imessage_.+:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
- regex: '@imessage_.+:{{ matrix_bridge_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
||||||
exclusive: true
|
exclusive: true
|
||||||
- exclusive: true
|
- exclusive: true
|
||||||
regex: '^@{{ matrix_mautrix_imessage_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
regex: '^@{{ matrix_bridge_mautrix_wsproxy_imessage_appservice_bot_username | regex_escape }}:{{ matrix_bridge_mautrix_wsproxy_homeserver_domain | regex_escape }}$'
|
||||||
|
|
||||||
matrix_mautrix_imessage_registration: "{{ matrix_mautrix_imessage_registration_yaml | from_yaml }}"
|
matrix_bridge_mautrix_wsproxy_imessage_registration: "{{ matrix_bridge_mautrix_wsproxy_imessage_registration_yaml | from_yaml }}"
|
||||||
|
|
||||||
# Syncproxy-related configuration fields
|
# Syncproxy-related configuration fields
|
||||||
# renovate: datasource=docker depName=dock.mau.dev/mautrix/syncproxy
|
# renovate: datasource=docker depName=dock.mau.dev/mautrix/syncproxy
|
||||||
matrix_mautrix_wsproxy_syncproxy_version: latest
|
matrix_bridge_mautrix_wsproxy_syncproxy_version: latest
|
||||||
# See: https://mau.dev/mautrix/wsproxy/container_registry
|
# See: https://mau.dev/mautrix/wsproxy/container_registry
|
||||||
matrix_mautrix_wsproxy_syncproxy_container_image: "dock.mau.dev/mautrix/syncproxy:{{ matrix_mautrix_wsproxy_syncproxy_version }}"
|
matrix_bridge_mautrix_wsproxy_syncproxy_container_image: "dock.mau.dev/mautrix/syncproxy:{{ matrix_bridge_mautrix_wsproxy_syncproxy_version }}"
|
||||||
matrix_mautrix_wsproxy_syncproxy_container_extra_arguments: []
|
matrix_bridge_mautrix_wsproxy_syncproxy_container_extra_arguments: []
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_syncproxy_systemd_required_services_list: |-
|
matrix_bridge_mautrix_wsproxy_syncproxy_systemd_required_services_list: |-
|
||||||
{{
|
{{
|
||||||
([devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [])
|
([devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [])
|
||||||
+
|
+
|
||||||
['matrix-mautrix-wsproxy.service']
|
['matrix-mautrix-wsproxy.service']
|
||||||
}}
|
}}
|
||||||
matrix_mautrix_wsproxy_syncproxy_systemd_wanted_services_list: []
|
matrix_bridge_mautrix_wsproxy_syncproxy_systemd_wanted_services_list: []
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_syncproxy_homeserver_url: ''
|
matrix_bridge_mautrix_wsproxy_syncproxy_homeserver_url: ''
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_syncproxy_shared_secret: ''
|
matrix_bridge_mautrix_wsproxy_syncproxy_shared_secret: ''
|
||||||
matrix_mautrix_wsproxy_syncproxy_port: 29332
|
matrix_bridge_mautrix_wsproxy_syncproxy_port: 29332
|
||||||
matrix_mautrix_wsproxy_syncproxy_appservice_address: "http://matrix-mautrix-wsproxy-syncproxy:{{ matrix_mautrix_wsproxy_syncproxy_port }}"
|
matrix_bridge_mautrix_wsproxy_syncproxy_appservice_address: "http://matrix-mautrix-wsproxy-syncproxy:{{ matrix_bridge_mautrix_wsproxy_syncproxy_port }}"
|
||||||
|
|
||||||
# Database-related configuration fields
|
# Database-related configuration fields
|
||||||
#
|
#
|
||||||
# This bridge supports Postgres and SQLite.
|
# This bridge supports Postgres and SQLite.
|
||||||
#
|
#
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_engine: 'postgres'
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_engine: 'postgres'
|
||||||
|
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_username: 'matrix_mautrix_wsproxy_syncproxy'
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_username: 'matrix_bridge_mautrix_wsproxy_syncproxy'
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_password: ''
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_password: ''
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_hostname: ''
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname: ''
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_port: 5432
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_port: 5432
|
||||||
matrix_mautrix_wsproxy_syncproxy_database_name: 'matrix_mautrix_wsproxy_syncproxy'
|
matrix_bridge_mautrix_wsproxy_syncproxy_database_name: 'matrix_bridge_mautrix_wsproxy_syncproxy'
|
||||||
|
|
||||||
matrix_mautrix_signal_wsproxy_syncproxy_connection_string: 'postgres://{{ matrix_mautrix_wsproxy_syncproxy_database_username }}:{{ matrix_mautrix_wsproxy_syncproxy_database_password }}@{{ matrix_mautrix_wsproxy_syncproxy_database_hostname }}:{{ matrix_mautrix_wsproxy_syncproxy_database_port }}/{{ matrix_mautrix_wsproxy_syncproxy_database_name }}'
|
matrix_bridge_mautrix_wsproxy_syncproxy_connection_string: 'postgres://{{ matrix_bridge_mautrix_wsproxy_syncproxy_database_username }}:{{ matrix_bridge_mautrix_wsproxy_syncproxy_database_password }}@{{ matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname }}:{{ matrix_bridge_mautrix_wsproxy_syncproxy_database_port }}/{{ matrix_bridge_mautrix_wsproxy_syncproxy_database_name }}'
|
||||||
|
|
||||||
# matrix_mautrix_wsproxy_restart_necessary controls whether the service
|
# matrix_bridge_mautrix_wsproxy_restart_necessary controls whether the service
|
||||||
# will be restarted (when true) or merely started (when false) by the
|
# will be restarted (when true) or merely started (when false) by the
|
||||||
# systemd service manager role (when conditional restart is enabled).
|
# systemd service manager role (when conditional restart is enabled).
|
||||||
#
|
#
|
||||||
@@ -185,9 +185,9 @@ matrix_mautrix_signal_wsproxy_syncproxy_connection_string: 'postgres://{{ matrix
|
|||||||
# any configuration files, the systemd service file, or the container image changed.
|
# 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
|
# 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).
|
# installation tasks haven't run (e.g., due to --tags skipping them).
|
||||||
matrix_mautrix_wsproxy_restart_necessary: false
|
matrix_bridge_mautrix_wsproxy_restart_necessary: false
|
||||||
|
|
||||||
# matrix_mautrix_wsproxy_syncproxy_restart_necessary controls whether the service
|
# matrix_bridge_mautrix_wsproxy_syncproxy_restart_necessary controls whether the service
|
||||||
# will be restarted (when true) or merely started (when false) by the
|
# will be restarted (when true) or merely started (when false) by the
|
||||||
# systemd service manager role (when conditional restart is enabled).
|
# systemd service manager role (when conditional restart is enabled).
|
||||||
#
|
#
|
||||||
@@ -195,4 +195,4 @@ matrix_mautrix_wsproxy_restart_necessary: false
|
|||||||
# any configuration files, the systemd service file, or the container image changed.
|
# 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
|
# 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).
|
# installation tasks haven't run (e.g., due to --tags skipping them).
|
||||||
matrix_mautrix_wsproxy_syncproxy_restart_necessary: false
|
matrix_bridge_mautrix_wsproxy_syncproxy_restart_necessary: false
|
||||||
|
|||||||
@@ -11,15 +11,15 @@
|
|||||||
- install-all
|
- install-all
|
||||||
- install-mautrix-wsproxy
|
- install-mautrix-wsproxy
|
||||||
block:
|
block:
|
||||||
- when: matrix_mautrix_wsproxy_enabled | bool
|
- when: matrix_bridge_mautrix_wsproxy_enabled | bool
|
||||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
|
|
||||||
- when: matrix_mautrix_wsproxy_enabled | bool
|
- when: matrix_bridge_mautrix_wsproxy_enabled | bool
|
||||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
|
|
||||||
- tags:
|
- tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-mautrix-wsproxy
|
- setup-mautrix-wsproxy
|
||||||
block:
|
block:
|
||||||
- when: not matrix_mautrix_wsproxy_enabled | bool
|
- when: not matrix_bridge_mautrix_wsproxy_enabled | bool
|
||||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
when: "matrix_synapse_role_executed|default(False)"
|
when: "matrix_synapse_role_executed|default(False)"
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
- ansible.builtin.set_fact:
|
||||||
matrix_mautrix_wsproxy_migration_requires_restart: false
|
matrix_bridge_mautrix_wsproxy_migration_requires_restart: false
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
- ansible.builtin.set_fact:
|
||||||
matrix_mautrix_wsproxy_syncproxy_migration_requires_restart: false
|
matrix_bridge_mautrix_wsproxy_syncproxy_migration_requires_restart: false
|
||||||
|
|
||||||
- name: Ensure Mautrix wsproxy paths exist
|
- name: Ensure Mautrix wsproxy paths exist
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -29,39 +29,39 @@
|
|||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- path: "{{ matrix_mautrix_wsproxy_base_path }}"
|
- path: "{{ matrix_bridge_mautrix_wsproxy_base_path }}"
|
||||||
when: true
|
when: true
|
||||||
when: item.when | bool
|
when: item.when | bool
|
||||||
|
|
||||||
- name: Ensure Mautrix wsproxy support files installed
|
- name: Ensure Mautrix wsproxy support files installed
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/{{ item }}.j2"
|
src: "{{ role_path }}/templates/{{ item }}.j2"
|
||||||
dest: "{{ matrix_mautrix_wsproxy_base_path }}/{{ item }}"
|
dest: "{{ matrix_bridge_mautrix_wsproxy_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:
|
||||||
- syncproxy-env
|
- syncproxy-env
|
||||||
- wsproxy-labels
|
- wsproxy-labels
|
||||||
register: matrix_mautrix_wsproxy_support_files_result
|
register: matrix_bridge_mautrix_wsproxy_support_files_result
|
||||||
|
|
||||||
- name: Ensure Mautrix wsproxy image is pulled
|
- name: Ensure Mautrix wsproxy image is pulled
|
||||||
community.docker.docker_image_pull:
|
community.docker.docker_image_pull:
|
||||||
name: "{{ matrix_mautrix_wsproxy_container_image }}"
|
name: "{{ matrix_bridge_mautrix_wsproxy_container_image }}"
|
||||||
pull: always
|
pull: always
|
||||||
register: matrix_mautrix_wsproxy_container_image_pull_result
|
register: matrix_bridge_mautrix_wsproxy_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: matrix_mautrix_wsproxy_container_image_pull_result is not failed
|
until: matrix_bridge_mautrix_wsproxy_container_image_pull_result is not failed
|
||||||
|
|
||||||
- name: Ensure Mautrix syncproxy image is pulled
|
- name: Ensure Mautrix syncproxy image is pulled
|
||||||
community.docker.docker_image_pull:
|
community.docker.docker_image_pull:
|
||||||
name: "{{ matrix_mautrix_wsproxy_syncproxy_container_image }}"
|
name: "{{ matrix_bridge_mautrix_wsproxy_syncproxy_container_image }}"
|
||||||
pull: always
|
pull: always
|
||||||
register: matrix_mautrix_wsproxy_syncproxy_container_image_pull_result
|
register: matrix_bridge_mautrix_wsproxy_syncproxy_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: matrix_mautrix_wsproxy_syncproxy_container_image_pull_result is not failed
|
until: matrix_bridge_mautrix_wsproxy_syncproxy_container_image_pull_result is not failed
|
||||||
|
|
||||||
- name: Ensure Mautrix wsproxy paths exists
|
- name: Ensure Mautrix wsproxy paths exists
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -71,46 +71,46 @@
|
|||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ matrix_mautrix_wsproxy_base_path }}"
|
- "{{ matrix_bridge_mautrix_wsproxy_base_path }}"
|
||||||
- "{{ matrix_mautrix_wsproxy_config_path }}"
|
- "{{ matrix_bridge_mautrix_wsproxy_config_path }}"
|
||||||
|
|
||||||
- name: Check if an old Matrix state file exists
|
- name: Check if an old Matrix state file exists
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ matrix_mautrix_wsproxy_base_path }}/mx-state.json"
|
path: "{{ matrix_bridge_mautrix_wsproxy_base_path }}/mx-state.json"
|
||||||
register: matrix_mautrix_wsproxy_stat_mx_state
|
register: matrix_bridge_mautrix_wsproxy_stat_mx_state
|
||||||
|
|
||||||
- name: Ensure mautrix-wsproxy config.yaml installed
|
- name: Ensure mautrix-wsproxy config.yaml installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_mautrix_wsproxy_configuration | to_nice_yaml }}"
|
content: "{{ matrix_bridge_mautrix_wsproxy_configuration | to_nice_yaml }}"
|
||||||
dest: "{{ matrix_mautrix_wsproxy_config_path }}/config.yaml"
|
dest: "{{ matrix_bridge_mautrix_wsproxy_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_mautrix_wsproxy_config_result
|
register: matrix_bridge_mautrix_wsproxy_config_result
|
||||||
|
|
||||||
- name: Ensure mautrix-androidsms registration.yaml installed
|
- name: Ensure mautrix-androidsms registration.yaml installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_mautrix_androidsms_registration | to_nice_yaml }}"
|
content: "{{ matrix_bridge_mautrix_wsproxy_androidsms_registration | to_nice_yaml }}"
|
||||||
dest: "{{ matrix_mautrix_wsproxy_config_path }}/androidsms-registration.yaml"
|
dest: "{{ matrix_bridge_mautrix_wsproxy_config_path }}/androidsms-registration.yaml"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_mautrix_wsproxy_registration_androidsms_result
|
register: matrix_bridge_mautrix_wsproxy_registration_androidsms_result
|
||||||
|
|
||||||
- name: Ensure mautrix-imessage registration.yaml installed
|
- name: Ensure mautrix-imessage registration.yaml installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_mautrix_imessage_registration | to_nice_yaml }}"
|
content: "{{ matrix_bridge_mautrix_wsproxy_imessage_registration | to_nice_yaml }}"
|
||||||
dest: "{{ matrix_mautrix_wsproxy_config_path }}/imessage-registration.yaml"
|
dest: "{{ matrix_bridge_mautrix_wsproxy_config_path }}/imessage-registration.yaml"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_mautrix_wsproxy_registration_imessage_result
|
register: matrix_bridge_mautrix_wsproxy_registration_imessage_result
|
||||||
|
|
||||||
- name: Ensure mautrix-wsproxy container network is created
|
- name: Ensure mautrix-wsproxy container network is created
|
||||||
when: matrix_mautrix_wsproxy_container_network != 'host'
|
when: matrix_bridge_mautrix_wsproxy_container_network != 'host'
|
||||||
community.general.docker_network:
|
community.general.docker_network:
|
||||||
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
|
||||||
name: "{{ matrix_mautrix_wsproxy_container_network }}"
|
name: "{{ matrix_bridge_mautrix_wsproxy_container_network }}"
|
||||||
driver: bridge
|
driver: bridge
|
||||||
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
|
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
|
||||||
|
|
||||||
@@ -119,55 +119,55 @@
|
|||||||
src: "{{ role_path }}/templates/systemd/matrix-mautrix-wsproxy.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-mautrix-wsproxy.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy.service"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
register: matrix_mautrix_wsproxy_systemd_service_result
|
register: matrix_bridge_mautrix_wsproxy_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Mautrix wsproxy needs a restart
|
- name: Determine whether Mautrix wsproxy needs a restart
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
matrix_mautrix_wsproxy_restart_necessary: >-
|
matrix_bridge_mautrix_wsproxy_restart_necessary: >-
|
||||||
{{
|
{{
|
||||||
matrix_mautrix_wsproxy_migration_requires_restart | default(false)
|
matrix_bridge_mautrix_wsproxy_migration_requires_restart | default(false)
|
||||||
or matrix_mautrix_wsproxy_support_files_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_support_files_result.changed | default(false)
|
||||||
or matrix_mautrix_wsproxy_config_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_config_result.changed | default(false)
|
||||||
or matrix_mautrix_wsproxy_registration_androidsms_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_registration_androidsms_result.changed | default(false)
|
||||||
or matrix_mautrix_wsproxy_registration_imessage_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_registration_imessage_result.changed | default(false)
|
||||||
or matrix_mautrix_wsproxy_systemd_service_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_systemd_service_result.changed | default(false)
|
||||||
or matrix_mautrix_wsproxy_container_image_pull_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_container_image_pull_result.changed | default(false)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy.service installation
|
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy.service installation
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: "matrix_mautrix_wsproxy_systemd_service_result.changed"
|
when: "matrix_bridge_mautrix_wsproxy_systemd_service_result.changed"
|
||||||
|
|
||||||
- name: Ensure matrix-mautrix-wsproxy.service restarted, if necessary
|
- name: Ensure matrix-mautrix-wsproxy.service restarted, if necessary
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: "matrix-mautrix-wsproxy.service"
|
name: "matrix-mautrix-wsproxy.service"
|
||||||
state: restarted
|
state: restarted
|
||||||
when: "matrix_mautrix_wsproxy_migration_requires_restart|bool"
|
when: "matrix_bridge_mautrix_wsproxy_migration_requires_restart|bool"
|
||||||
|
|
||||||
- name: Ensure matrix-mautrix-wsproxy-syncproxy.service installed
|
- name: Ensure matrix-mautrix-wsproxy-syncproxy.service installed
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/systemd/matrix-mautrix-wsproxy-syncproxy.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-mautrix-wsproxy-syncproxy.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy-syncproxy.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy-syncproxy.service"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
register: matrix_mautrix_wsproxy_syncproxy_systemd_service_result
|
register: matrix_bridge_mautrix_wsproxy_syncproxy_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether Mautrix wsproxy syncproxy needs a restart
|
- name: Determine whether Mautrix wsproxy syncproxy needs a restart
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
matrix_mautrix_wsproxy_syncproxy_restart_necessary: >-
|
matrix_bridge_mautrix_wsproxy_syncproxy_restart_necessary: >-
|
||||||
{{
|
{{
|
||||||
matrix_mautrix_wsproxy_syncproxy_migration_requires_restart | default(false)
|
matrix_bridge_mautrix_wsproxy_syncproxy_migration_requires_restart | default(false)
|
||||||
or matrix_mautrix_wsproxy_syncproxy_systemd_service_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_syncproxy_systemd_service_result.changed | default(false)
|
||||||
or matrix_mautrix_wsproxy_syncproxy_container_image_pull_result.changed | default(false)
|
or matrix_bridge_mautrix_wsproxy_syncproxy_container_image_pull_result.changed | default(false)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy-syncproxy.service installation
|
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy-syncproxy.service installation
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: "matrix_mautrix_wsproxy_syncproxy_systemd_service_result.changed"
|
when: "matrix_bridge_mautrix_wsproxy_syncproxy_systemd_service_result.changed"
|
||||||
|
|
||||||
- name: Ensure matrix-mautrix-wsproxy-syncproxy.service restarted, if necessary
|
- name: Ensure matrix-mautrix-wsproxy-syncproxy.service restarted, if necessary
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: "matrix-mautrix-wsproxy-syncproxy.service"
|
name: "matrix-mautrix-wsproxy-syncproxy.service"
|
||||||
state: restarted
|
state: restarted
|
||||||
when: "matrix_mautrix_wsproxy_syncproxy_migration_requires_restart|bool"
|
when: "matrix_bridge_mautrix_wsproxy_syncproxy_migration_requires_restart|bool"
|
||||||
|
|||||||
@@ -7,45 +7,45 @@
|
|||||||
- name: Check existence of matrix-mautrix-wsproxy service
|
- name: Check existence of matrix-mautrix-wsproxy service
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy.service"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy.service"
|
||||||
register: matrix_mautrix_wsproxy_service_stat
|
register: matrix_bridge_mautrix_wsproxy_service_stat
|
||||||
|
|
||||||
- name: Ensure matrix-mautrix-wsproxy is stopped
|
- name: Ensure matrix-mautrix-wsproxy is stopped
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: matrix-mautrix-wsproxy
|
name: matrix-mautrix-wsproxy
|
||||||
state: stopped
|
state: stopped
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: "matrix_mautrix_wsproxy_service_stat.stat.exists"
|
when: "matrix_bridge_mautrix_wsproxy_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Ensure matrix-mautrix-wsproxy.service doesn't exist
|
- name: Ensure matrix-mautrix-wsproxy.service doesn't exist
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy.service"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy.service"
|
||||||
state: absent
|
state: absent
|
||||||
when: "matrix_mautrix_wsproxy_service_stat.stat.exists"
|
when: "matrix_bridge_mautrix_wsproxy_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy.service removal
|
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy.service removal
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: "matrix_mautrix_wsproxy_service_stat.stat.exists"
|
when: "matrix_bridge_mautrix_wsproxy_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Check existence of matrix-mautrix-wsproxy-syncproxy service
|
- name: Check existence of matrix-mautrix-wsproxy-syncproxy service
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy-syncproxy.service"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy-syncproxy.service"
|
||||||
register: matrix_mautrix_wsproxy_syncproxy_service_stat
|
register: matrix_bridge_mautrix_wsproxy_syncproxy_service_stat
|
||||||
|
|
||||||
- name: Ensure matrix-mautrix-wsproxy-syncproxy is stopped
|
- name: Ensure matrix-mautrix-wsproxy-syncproxy is stopped
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: matrix-mautrix-wsproxy-syncproxy
|
name: matrix-mautrix-wsproxy-syncproxy
|
||||||
state: stopped
|
state: stopped
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: "matrix_mautrix_wsproxy_syncproxy_service_stat.stat.exists"
|
when: "matrix_bridge_mautrix_wsproxy_syncproxy_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Ensure matrix-mautrix-wsproxy-syncproxy.service doesn't exist
|
- name: Ensure matrix-mautrix-wsproxy-syncproxy.service doesn't exist
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy-syncproxy.service"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-wsproxy-syncproxy.service"
|
||||||
state: absent
|
state: absent
|
||||||
when: "matrix_mautrix_wsproxy_syncproxy_service_stat.stat.exists"
|
when: "matrix_bridge_mautrix_wsproxy_syncproxy_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy-syncproxy.service removal
|
- name: Ensure systemd reloaded after matrix-mautrix-wsproxy-syncproxy.service removal
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: "matrix_mautrix_wsproxy_syncproxy_service_stat.stat.exists"
|
when: "matrix_bridge_mautrix_wsproxy_syncproxy_service_stat.stat.exists"
|
||||||
|
|||||||
@@ -12,15 +12,15 @@
|
|||||||
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_mautrix_wsproxy_docker_image', 'new': 'matrix_mautrix_wsproxy_container_image'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_docker_image', 'new': 'matrix_bridge_mautrix_wsproxy_container_image'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_docker_image_force_pull', 'new': 'matrix_mautrix_wsproxy_container_image_force_pull'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_docker_image_force_pull', 'new': 'matrix_bridge_mautrix_wsproxy_container_image_force_pull'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_docker_image_registry_prefix', 'new': 'matrix_mautrix_wsproxy_container_image_registry_prefix'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_docker_image_registry_prefix', 'new': 'matrix_bridge_mautrix_wsproxy_container_image_registry_prefix'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_docker_image_registry_prefix_upstream', 'new': 'matrix_mautrix_wsproxy_container_image_registry_prefix_upstream'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_docker_image_registry_prefix_upstream', 'new': 'matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_docker_image_registry_prefix_upstream_default', 'new': 'matrix_mautrix_wsproxy_container_image_registry_prefix_upstream_default'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream_default'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_syncproxy_docker_image', 'new': 'matrix_mautrix_wsproxy_syncproxy_container_image'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_syncproxy_docker_image', 'new': 'matrix_bridge_mautrix_wsproxy_syncproxy_container_image'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_syncproxy_docker_image_force_pull', 'new': 'matrix_mautrix_wsproxy_syncproxy_container_image_force_pull'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_syncproxy_docker_image_force_pull', 'new': 'matrix_bridge_mautrix_wsproxy_syncproxy_container_image_force_pull'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
||||||
- {'old': 'matrix_mautrix_wsproxy_syncproxy_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
- {'old': 'matrix_bridge_mautrix_wsproxy_syncproxy_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
||||||
|
|
||||||
|
|
||||||
- name: Fail if required settings not defined
|
- name: Fail if required settings not defined
|
||||||
@@ -29,12 +29,12 @@
|
|||||||
You need to define a required configuration setting (`{{ item }}`).
|
You need to define a required configuration setting (`{{ item }}`).
|
||||||
when: "lookup('vars', item, default='') == ''"
|
when: "lookup('vars', item, default='') == ''"
|
||||||
with_items:
|
with_items:
|
||||||
- "matrix_mautrix_androidsms_appservice_token"
|
- "matrix_bridge_mautrix_wsproxy_androidsms_appservice_token"
|
||||||
- "matrix_mautrix_androidsms_homeserver_token"
|
- "matrix_bridge_mautrix_wsproxy_androidsms_homeserver_token"
|
||||||
- "matrix_mautrix_imessage_appservice_token"
|
- "matrix_bridge_mautrix_wsproxy_imessage_appservice_token"
|
||||||
- "matrix_mautrix_imessage_homeserver_token"
|
- "matrix_bridge_mautrix_wsproxy_imessage_homeserver_token"
|
||||||
- "matrix_mautrix_wsproxy_homeserver_address"
|
- "matrix_bridge_mautrix_wsproxy_homeserver_address"
|
||||||
- "matrix_mautrix_wsproxy_syncproxy_shared_secret"
|
- "matrix_bridge_mautrix_wsproxy_syncproxy_shared_secret"
|
||||||
- "matrix_mautrix_wsproxy_syncproxy_homeserver_url"
|
- "matrix_bridge_mautrix_wsproxy_syncproxy_homeserver_url"
|
||||||
- "matrix_mautrix_wsproxy_syncproxy_database_hostname"
|
- "matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname"
|
||||||
- "matrix_mautrix_wsproxy_syncproxy_database_password"
|
- "matrix_bridge_mautrix_wsproxy_syncproxy_database_password"
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||||||
listen_address: 0.0.0.0:29331
|
listen_address: 0.0.0.0:29331
|
||||||
appservices:
|
appservices:
|
||||||
- id: androidsms
|
- id: androidsms
|
||||||
as: {{ matrix_mautrix_androidsms_appservice_token | to_json }}
|
as: {{ matrix_bridge_mautrix_wsproxy_androidsms_appservice_token | to_json }}
|
||||||
hs: {{ matrix_mautrix_androidsms_homeserver_token | to_json }}
|
hs: {{ matrix_bridge_mautrix_wsproxy_androidsms_homeserver_token | to_json }}
|
||||||
- id: imessage
|
- id: imessage
|
||||||
as: {{ matrix_mautrix_imessage_appservice_token | to_json }}
|
as: {{ matrix_bridge_mautrix_wsproxy_imessage_appservice_token | to_json }}
|
||||||
hs: {{ matrix_mautrix_imessage_homeserver_token | to_json }}
|
hs: {{ matrix_bridge_mautrix_wsproxy_imessage_homeserver_token | to_json }}
|
||||||
sync_proxy:
|
sync_proxy:
|
||||||
# The URL that mautrix-wsproxy can use to reach mautrix-syncproxy
|
# The URL that mautrix-wsproxy can use to reach mautrix-syncproxy
|
||||||
url: {{ matrix_mautrix_wsproxy_syncproxy_appservice_address | to_json }}
|
url: {{ matrix_bridge_mautrix_wsproxy_syncproxy_appservice_address | to_json }}
|
||||||
# The URL that mautrix-syncproxy can use to reach mautrix-wsproxy
|
# The URL that mautrix-syncproxy can use to reach mautrix-wsproxy
|
||||||
wsproxy_url: {{ matrix_mautrix_wsproxy_appservice_address | to_json }}
|
wsproxy_url: {{ matrix_bridge_mautrix_wsproxy_appservice_address | to_json }}
|
||||||
shared_secret: {{ matrix_mautrix_wsproxy_syncproxy_shared_secret | to_json }}
|
shared_secret: {{ matrix_bridge_mautrix_wsproxy_syncproxy_shared_secret | to_json }}
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ SPDX-FileCopyrightText: 2024 Slavi Pantaleev
|
|||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
#}
|
#}
|
||||||
|
|
||||||
DATABASE_URL={{ matrix_mautrix_signal_wsproxy_syncproxy_connection_string }}
|
DATABASE_URL={{ matrix_bridge_mautrix_wsproxy_syncproxy_connection_string }}
|
||||||
HOMESERVER_URL={{ matrix_mautrix_wsproxy_syncproxy_homeserver_url }}
|
HOMESERVER_URL={{ matrix_bridge_mautrix_wsproxy_syncproxy_homeserver_url }}
|
||||||
SHARED_SECRET={{ matrix_mautrix_wsproxy_syncproxy_shared_secret }}
|
SHARED_SECRET={{ matrix_bridge_mautrix_wsproxy_syncproxy_shared_secret }}
|
||||||
|
|||||||
+8
-8
@@ -1,11 +1,11 @@
|
|||||||
#jinja2: lstrip_blocks: True
|
#jinja2: lstrip_blocks: True
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Matrix Mautrix wsproxy syncproxy
|
Description=Matrix Mautrix wsproxy syncproxy
|
||||||
{% for service in matrix_mautrix_wsproxy_syncproxy_systemd_required_services_list %}
|
{% for service in matrix_bridge_mautrix_wsproxy_syncproxy_systemd_required_services_list %}
|
||||||
Requires={{ service }}
|
Requires={{ service }}
|
||||||
After={{ service }}
|
After={{ service }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for service in matrix_mautrix_wsproxy_syncproxy_systemd_wanted_services_list %}
|
{% for service in matrix_bridge_mautrix_wsproxy_syncproxy_systemd_wanted_services_list %}
|
||||||
Wants={{ service }}
|
Wants={{ service }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
@@ -22,15 +22,15 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
|
|||||||
--log-driver=none \
|
--log-driver=none \
|
||||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||||
--cap-drop=ALL \
|
--cap-drop=ALL \
|
||||||
--network={{ matrix_mautrix_wsproxy_container_network }} \
|
--network={{ matrix_bridge_mautrix_wsproxy_container_network }} \
|
||||||
--env-file={{ matrix_mautrix_wsproxy_base_path }}/syncproxy-env \
|
--env-file={{ matrix_bridge_mautrix_wsproxy_base_path }}/syncproxy-env \
|
||||||
{% for arg in matrix_mautrix_wsproxy_syncproxy_container_extra_arguments %}
|
{% for arg in matrix_bridge_mautrix_wsproxy_syncproxy_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_mautrix_wsproxy_syncproxy_container_image }}
|
{{ matrix_bridge_mautrix_wsproxy_syncproxy_container_image }}
|
||||||
|
|
||||||
{% if matrix_mautrix_wsproxy_container_network != 'host' %}
|
{% if matrix_bridge_mautrix_wsproxy_container_network != 'host' %}
|
||||||
{% for network in matrix_mautrix_wsproxy_container_additional_networks %}
|
{% for network in matrix_bridge_mautrix_wsproxy_container_additional_networks %}
|
||||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-wsproxy-syncproxy
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-wsproxy-syncproxy
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
+11
-11
@@ -1,11 +1,11 @@
|
|||||||
#jinja2: lstrip_blocks: True
|
#jinja2: lstrip_blocks: True
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Matrix Mautrix wsproxy bridge
|
Description=Matrix Mautrix wsproxy bridge
|
||||||
{% for service in matrix_mautrix_wsproxy_systemd_required_services_list %}
|
{% for service in matrix_bridge_mautrix_wsproxy_systemd_required_services_list %}
|
||||||
Requires={{ service }}
|
Requires={{ service }}
|
||||||
After={{ service }}
|
After={{ service }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for service in matrix_mautrix_wsproxy_systemd_wanted_services_list %}
|
{% for service in matrix_bridge_mautrix_wsproxy_systemd_wanted_services_list %}
|
||||||
Wants={{ service }}
|
Wants={{ service }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
@@ -20,20 +20,20 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create --rm -
|
|||||||
--log-driver=none \
|
--log-driver=none \
|
||||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||||
--cap-drop=ALL \
|
--cap-drop=ALL \
|
||||||
--network={{ matrix_mautrix_wsproxy_container_network }} \
|
--network={{ matrix_bridge_mautrix_wsproxy_container_network }} \
|
||||||
{% if matrix_mautrix_wsproxy_bind_port %}
|
{% if matrix_bridge_mautrix_wsproxy_bind_port %}
|
||||||
-p {{ matrix_mautrix_wsproxy_port }}:29331 \
|
-p {{ matrix_bridge_mautrix_wsproxy_port }}:29331 \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
--mount type=bind,src={{ matrix_mautrix_wsproxy_config_path }},dst=/data \
|
--mount type=bind,src={{ matrix_bridge_mautrix_wsproxy_config_path }},dst=/data \
|
||||||
--label-file={{ matrix_mautrix_wsproxy_base_path }}/wsproxy-labels \
|
--label-file={{ matrix_bridge_mautrix_wsproxy_base_path }}/wsproxy-labels \
|
||||||
{% for arg in matrix_mautrix_wsproxy_container_extra_arguments %}
|
{% for arg in matrix_bridge_mautrix_wsproxy_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ matrix_mautrix_wsproxy_container_image }} \
|
{{ matrix_bridge_mautrix_wsproxy_container_image }} \
|
||||||
/usr/bin/mautrix-wsproxy -config /data/config.yaml
|
/usr/bin/mautrix-wsproxy -config /data/config.yaml
|
||||||
|
|
||||||
{% if matrix_mautrix_wsproxy_container_network != 'host' %}
|
{% if matrix_bridge_mautrix_wsproxy_container_network != 'host' %}
|
||||||
{% for network in matrix_mautrix_wsproxy_container_additional_networks %}
|
{% for network in matrix_bridge_mautrix_wsproxy_container_additional_networks %}
|
||||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-wsproxy
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-mautrix-wsproxy
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -4,37 +4,37 @@ SPDX-FileCopyrightText: 2023 Johan Swetzén
|
|||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% if matrix_mautrix_wsproxy_container_labels_traefik_enabled %}
|
{% if matrix_bridge_mautrix_wsproxy_container_labels_traefik_enabled %}
|
||||||
traefik.enable=true
|
traefik.enable=true
|
||||||
|
|
||||||
{% if matrix_mautrix_wsproxy_container_labels_traefik_docker_network %}
|
{% if matrix_bridge_mautrix_wsproxy_container_labels_traefik_docker_network %}
|
||||||
traefik.docker.network={{ matrix_mautrix_wsproxy_container_labels_traefik_docker_network }}
|
traefik.docker.network={{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_docker_network }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set middlewares = [] %}
|
{% set middlewares = [] %}
|
||||||
|
|
||||||
{% if matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers.keys() | length > 0 %}
|
{% if matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers.keys() | length > 0 %}
|
||||||
{% for name, value in matrix_mautrix_wsproxy_container_labels_traefik_additional_response_headers.items() %}
|
{% for name, value in matrix_bridge_mautrix_wsproxy_container_labels_traefik_additional_response_headers.items() %}
|
||||||
traefik.http.middlewares.matrix-mautrix-wsproxy-add-headers.headers.customresponseheaders.{{ name }}={{ value }}
|
traefik.http.middlewares.matrix-mautrix-wsproxy-add-headers.headers.customresponseheaders.{{ name }}={{ value }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% set middlewares = middlewares + ['matrix-mautrix-wsproxy-add-headers'] %}
|
{% set middlewares = middlewares + ['matrix-mautrix-wsproxy-add-headers'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
traefik.http.routers.matrix-mautrix-wsproxy.rule={{ matrix_mautrix_wsproxy_container_labels_traefik_rule }}
|
traefik.http.routers.matrix-mautrix-wsproxy.rule={{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_rule }}
|
||||||
{% if matrix_mautrix_wsproxy_container_labels_traefik_priority | int > 0 %}
|
{% if matrix_bridge_mautrix_wsproxy_container_labels_traefik_priority | int > 0 %}
|
||||||
traefik.http.routers.matrix-mautrix-wsproxy.priority={{ matrix_mautrix_wsproxy_container_labels_traefik_priority }}
|
traefik.http.routers.matrix-mautrix-wsproxy.priority={{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_priority }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
traefik.http.routers.matrix-mautrix-wsproxy.service=matrix-mautrix-wsproxy
|
traefik.http.routers.matrix-mautrix-wsproxy.service=matrix-mautrix-wsproxy
|
||||||
{% if middlewares | length > 0 %}
|
{% if middlewares | length > 0 %}
|
||||||
traefik.http.routers.matrix-mautrix-wsproxy.middlewares={{ middlewares | join(',') }}
|
traefik.http.routers.matrix-mautrix-wsproxy.middlewares={{ middlewares | join(',') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
traefik.http.routers.matrix-mautrix-wsproxy.entrypoints={{ matrix_mautrix_wsproxy_container_labels_traefik_entrypoints }}
|
traefik.http.routers.matrix-mautrix-wsproxy.entrypoints={{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_entrypoints }}
|
||||||
traefik.http.routers.matrix-mautrix-wsproxy.tls={{ matrix_mautrix_wsproxy_container_labels_traefik_tls | to_json }}
|
traefik.http.routers.matrix-mautrix-wsproxy.tls={{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls | to_json }}
|
||||||
{% if matrix_mautrix_wsproxy_container_labels_traefik_tls %}
|
{% if matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls %}
|
||||||
traefik.http.routers.matrix-mautrix-wsproxy.tls.certResolver={{ matrix_mautrix_wsproxy_container_labels_traefik_tls_certResolver }}
|
traefik.http.routers.matrix-mautrix-wsproxy.tls.certResolver={{ matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls_certResolver }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
traefik.http.services.matrix-mautrix-wsproxy.loadbalancer.server.port={{ matrix_mautrix_wsproxy_port }}
|
traefik.http.services.matrix-mautrix-wsproxy.loadbalancer.server.port={{ matrix_bridge_mautrix_wsproxy_port }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ matrix_mautrix_wsproxy_container_labels_additional_labels }}
|
{{ matrix_bridge_mautrix_wsproxy_container_labels_additional_labels }}
|
||||||
|
|||||||
Reference in New Issue
Block a user