mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-07-16 19:53:53 +03:00
Rename matrix_appservice_irc_* variables to matrix_bridge_appservice_irc_*
Part of adopting a uniform naming policy for bridge variables, where the variable prefix matches the role directory name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,9 @@ See the project's [documentation](https://github.com/matrix-org/matrix-appservic
|
|||||||
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_appservice_irc_enabled: true
|
matrix_bridge_appservice_irc_enabled: true
|
||||||
|
|
||||||
matrix_appservice_irc_ircService_servers:
|
matrix_bridge_appservice_irc_ircService_servers:
|
||||||
irc.example.com:
|
irc.example.com:
|
||||||
name: "ExampleNet"
|
name: "ExampleNet"
|
||||||
port: 6697
|
port: 6697
|
||||||
@@ -76,7 +76,7 @@ There are some additional things you may wish to configure about the bridge.
|
|||||||
Take a look at:
|
Take a look at:
|
||||||
|
|
||||||
- `roles/custom/matrix-bridge-appservice-irc/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
|
- `roles/custom/matrix-bridge-appservice-irc/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
|
||||||
- `roles/custom/matrix-bridge-appservice-irc/templates/config.yaml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_appservice_irc_configuration_extension_yaml` variable
|
- `roles/custom/matrix-bridge-appservice-irc/templates/config.yaml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_bridge_appservice_irc_configuration_extension_yaml` variable
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ As with all other services, you can find the logs in [systemd-journald](https://
|
|||||||
The default logging level for this component is `debug`, and the log is output to the console only. If you want to change the verbosity or enable logging to a file, add the following configuration to your `vars.yml` file (adapt to your needs) and re-run the playbook:
|
The default logging level for this component is `debug`, and the log is output to the console only. If you want to change the verbosity or enable logging to a file, add the following configuration to your `vars.yml` file (adapt to your needs) and re-run the playbook:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matrix_appservice_irc_configuration_extension_yaml: |
|
matrix_bridge_appservice_irc_configuration_extension_yaml: |
|
||||||
logging:
|
logging:
|
||||||
# Level to log on console/logfile.
|
# Level to log on console/logfile.
|
||||||
# Valid values: error, warn, info, debug
|
# Valid values: error, warn, info, debug
|
||||||
|
|||||||
+31
-31
@@ -100,7 +100,7 @@ matrix_homeserver_container_extra_arguments_auto: |
|
|||||||
+
|
+
|
||||||
(['--mount type=bind,src=' + matrix_appservice_double_puppet_config_path + '/registration.yaml,dst=/matrix-appservice-double-puppet-registration.yaml,ro'] if matrix_appservice_double_puppet_enabled else [])
|
(['--mount type=bind,src=' + matrix_appservice_double_puppet_config_path + '/registration.yaml,dst=/matrix-appservice-double-puppet-registration.yaml,ro'] if matrix_appservice_double_puppet_enabled else [])
|
||||||
+
|
+
|
||||||
(['--mount type=bind,src=' + matrix_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_appservice_irc_enabled else [])
|
(['--mount type=bind,src=' + matrix_bridge_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_bridge_appservice_irc_enabled else [])
|
||||||
+
|
+
|
||||||
(['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else [])
|
(['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else [])
|
||||||
+
|
+
|
||||||
@@ -159,7 +159,7 @@ matrix_homeserver_app_service_config_files_auto: |
|
|||||||
+
|
+
|
||||||
(['/matrix-appservice-double-puppet-registration.yaml'] if matrix_appservice_double_puppet_enabled else [])
|
(['/matrix-appservice-double-puppet-registration.yaml'] if matrix_appservice_double_puppet_enabled else [])
|
||||||
+
|
+
|
||||||
(['/matrix-appservice-irc-registration.yaml'] if matrix_appservice_irc_enabled else [])
|
(['/matrix-appservice-irc-registration.yaml'] if matrix_bridge_appservice_irc_enabled else [])
|
||||||
+
|
+
|
||||||
(['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else [])
|
(['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else [])
|
||||||
+
|
+
|
||||||
@@ -366,9 +366,9 @@ devture_systemd_service_manager_services_list_auto: |
|
|||||||
([{
|
([{
|
||||||
'name': 'matrix-appservice-irc.service',
|
'name': 'matrix-appservice-irc.service',
|
||||||
'priority': 2000,
|
'priority': 2000,
|
||||||
'restart_necessary': (matrix_appservice_irc_restart_necessary | bool),
|
'restart_necessary': (matrix_bridge_appservice_irc_restart_necessary | bool),
|
||||||
'groups': ['matrix', 'bridges', 'appservice-irc'],
|
'groups': ['matrix', 'bridges', 'appservice-irc'],
|
||||||
}] if matrix_appservice_irc_enabled else [])
|
}] if matrix_bridge_appservice_irc_enabled else [])
|
||||||
+
|
+
|
||||||
([{
|
([{
|
||||||
'name': 'matrix-beeper-linkedin.service',
|
'name': 'matrix-beeper-linkedin.service',
|
||||||
@@ -1224,54 +1224,54 @@ matrix_bridge_appservice_discord_database_password: "{{ (matrix_homeserver_gener
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
# We don't enable bridges by default.
|
# We don't enable bridges by default.
|
||||||
matrix_appservice_irc_enabled: false
|
matrix_bridge_appservice_irc_enabled: false
|
||||||
|
|
||||||
matrix_appservice_irc_systemd_required_services_list_auto: |
|
matrix_bridge_appservice_irc_systemd_required_services_list_auto: |
|
||||||
{{
|
{{
|
||||||
matrix_addons_homeserver_systemd_services_list
|
matrix_addons_homeserver_systemd_services_list
|
||||||
+
|
+
|
||||||
([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_irc_database_hostname == postgres_connection_hostname) else [])
|
([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname) else [])
|
||||||
}}
|
}}
|
||||||
|
|
||||||
matrix_appservice_irc_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_irc_container_image_registry_prefix_upstream_default }}"
|
matrix_bridge_appservice_irc_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_appservice_irc_container_image_registry_prefix_upstream_default }}"
|
||||||
|
|
||||||
matrix_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
|
matrix_bridge_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
|
||||||
|
|
||||||
matrix_appservice_irc_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9999') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
|
matrix_bridge_appservice_irc_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9999') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
|
||||||
|
|
||||||
matrix_appservice_irc_container_network: "{{ matrix_addons_container_network }}"
|
matrix_bridge_appservice_irc_container_network: "{{ matrix_addons_container_network }}"
|
||||||
|
|
||||||
matrix_appservice_irc_container_additional_networks_auto: |-
|
matrix_bridge_appservice_irc_container_additional_networks_auto: |-
|
||||||
{{
|
{{
|
||||||
(
|
(
|
||||||
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
|
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
|
||||||
+
|
+
|
||||||
([postgres_container_network] if (postgres_enabled and matrix_appservice_irc_database_hostname == postgres_connection_hostname and matrix_appservice_irc_container_network != postgres_container_network) else [])
|
([postgres_container_network] if (postgres_enabled and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname and matrix_bridge_appservice_irc_container_network != postgres_container_network) else [])
|
||||||
+
|
+
|
||||||
[matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_appservice_irc_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
|
[matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_bridge_appservice_irc_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
|
||||||
) | unique
|
) | unique
|
||||||
}}
|
}}
|
||||||
|
|
||||||
# The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
|
# The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
|
||||||
# IRC bridge presence, for performance reasons.
|
# IRC bridge presence, for performance reasons.
|
||||||
matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled if matrix_homeserver_implementation == 'synapse' else true }}"
|
matrix_bridge_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled if matrix_homeserver_implementation == 'synapse' else true }}"
|
||||||
|
|
||||||
matrix_appservice_irc_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.as.token') | hash('sha512') | to_uuid }}"
|
matrix_bridge_appservice_irc_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.as.token') | hash('sha512') | to_uuid }}"
|
||||||
|
|
||||||
matrix_appservice_irc_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
|
matrix_bridge_appservice_irc_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
|
||||||
matrix_appservice_irc_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.hs.token') | hash('sha512') | to_uuid }}"
|
matrix_bridge_appservice_irc_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.hs.token') | hash('sha512') | to_uuid }}"
|
||||||
|
|
||||||
matrix_appservice_irc_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
|
matrix_bridge_appservice_irc_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
|
||||||
matrix_appservice_irc_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
|
matrix_bridge_appservice_irc_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
|
||||||
matrix_appservice_irc_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.irc.db') | hash('sha512') | to_uuid }}"
|
matrix_bridge_appservice_irc_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.irc.db') | hash('sha512') | to_uuid }}"
|
||||||
matrix_appservice_irc_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
|
matrix_bridge_appservice_irc_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
|
||||||
|
|
||||||
matrix_appservice_irc_ircService_mediaProxy_publicUrl_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}" # noqa var-naming
|
matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}" # noqa var-naming
|
||||||
|
|
||||||
matrix_appservice_irc_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
|
matrix_bridge_appservice_irc_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
|
||||||
matrix_appservice_irc_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
|
matrix_bridge_appservice_irc_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
|
||||||
matrix_appservice_irc_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
|
matrix_bridge_appservice_irc_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
|
||||||
matrix_appservice_irc_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
|
matrix_bridge_appservice_irc_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
@@ -4153,10 +4153,10 @@ postgres_managed_databases_auto: |
|
|||||||
}] if (matrix_appservice_draupnir_for_all_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
|
}] if (matrix_appservice_draupnir_for_all_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
|
||||||
+
|
+
|
||||||
([{
|
([{
|
||||||
'name': matrix_appservice_irc_database_name,
|
'name': matrix_bridge_appservice_irc_database_name,
|
||||||
'username': matrix_appservice_irc_database_username,
|
'username': matrix_bridge_appservice_irc_database_username,
|
||||||
'password': matrix_appservice_irc_database_password,
|
'password': matrix_bridge_appservice_irc_database_password,
|
||||||
}] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == postgres_connection_hostname) else [])
|
}] if (matrix_bridge_appservice_irc_enabled and matrix_bridge_appservice_irc_database_engine == 'postgres' and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname) else [])
|
||||||
+
|
+
|
||||||
([{
|
([{
|
||||||
'name': matrix_beeper_linkedin_database_name,
|
'name': matrix_beeper_linkedin_database_name,
|
||||||
|
|||||||
@@ -23,70 +23,70 @@
|
|||||||
# Matrix Appservice IRC is a Matrix <-> IRC bridge
|
# Matrix Appservice IRC is a Matrix <-> IRC bridge
|
||||||
# Project source code URL: https://github.com/matrix-org/matrix-appservice-irc
|
# Project source code URL: https://github.com/matrix-org/matrix-appservice-irc
|
||||||
|
|
||||||
matrix_appservice_irc_enabled: true
|
matrix_bridge_appservice_irc_enabled: true
|
||||||
|
|
||||||
matrix_appservice_irc_container_image_self_build: false
|
matrix_bridge_appservice_irc_container_image_self_build: false
|
||||||
matrix_appservice_irc_container_repo: "https://github.com/matrix-org/matrix-appservice-irc.git"
|
matrix_bridge_appservice_irc_container_repo: "https://github.com/matrix-org/matrix-appservice-irc.git"
|
||||||
matrix_appservice_irc_container_repo_version: "{{ 'master' if matrix_appservice_irc_version == 'latest' else matrix_appservice_irc_version }}"
|
matrix_bridge_appservice_irc_container_repo_version: "{{ 'master' if matrix_bridge_appservice_irc_version == 'latest' else matrix_bridge_appservice_irc_version }}"
|
||||||
matrix_appservice_irc_container_src_files_path: "{{ matrix_base_data_path }}/appservice-irc/docker-src"
|
matrix_bridge_appservice_irc_container_src_files_path: "{{ matrix_base_data_path }}/appservice-irc/docker-src"
|
||||||
|
|
||||||
# matrix_appservice_irc_version used to contain the full Docker image tag (e.g. `release-X.X.X`).
|
# matrix_bridge_appservice_irc_version used to contain the full Docker image tag (e.g. `release-X.X.X`).
|
||||||
# It's a bare version number now. We try to somewhat retain compatibility below.
|
# It's a bare version number now. We try to somewhat retain compatibility below.
|
||||||
# renovate: datasource=docker depName=docker.io/matrixdotorg/matrix-appservice-irc
|
# renovate: datasource=docker depName=docker.io/matrixdotorg/matrix-appservice-irc
|
||||||
matrix_appservice_irc_version: 4.0.0
|
matrix_bridge_appservice_irc_version: 4.0.0
|
||||||
matrix_appservice_irc_container_image: "{{ matrix_appservice_irc_container_image_registry_prefix }}matrixdotorg/matrix-appservice-irc:{{ matrix_appservice_irc_container_image_tag }}"
|
matrix_bridge_appservice_irc_container_image: "{{ matrix_bridge_appservice_irc_container_image_registry_prefix }}matrixdotorg/matrix-appservice-irc:{{ matrix_bridge_appservice_irc_container_image_tag }}"
|
||||||
matrix_appservice_irc_container_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_irc_container_image_self_build else matrix_appservice_irc_container_image_registry_prefix_upstream }}"
|
matrix_bridge_appservice_irc_container_image_registry_prefix: "{{ 'localhost/' if matrix_bridge_appservice_irc_container_image_self_build else matrix_bridge_appservice_irc_container_image_registry_prefix_upstream }}"
|
||||||
matrix_appservice_irc_container_image_registry_prefix_upstream: "{{ matrix_appservice_irc_container_image_registry_prefix_upstream_default }}"
|
matrix_bridge_appservice_irc_container_image_registry_prefix_upstream: "{{ matrix_bridge_appservice_irc_container_image_registry_prefix_upstream_default }}"
|
||||||
matrix_appservice_irc_container_image_registry_prefix_upstream_default: docker.io/
|
matrix_bridge_appservice_irc_container_image_registry_prefix_upstream_default: docker.io/
|
||||||
matrix_appservice_irc_container_image_tag: "{{ 'latest' if matrix_appservice_irc_version == 'latest' else ('release-' + matrix_appservice_irc_version) }}"
|
matrix_bridge_appservice_irc_container_image_tag: "{{ 'latest' if matrix_bridge_appservice_irc_version == 'latest' else ('release-' + matrix_bridge_appservice_irc_version) }}"
|
||||||
|
|
||||||
matrix_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc"
|
matrix_bridge_appservice_irc_base_path: "{{ matrix_base_data_path }}/appservice-irc"
|
||||||
matrix_appservice_irc_config_path: "{{ matrix_appservice_irc_base_path }}/config"
|
matrix_bridge_appservice_irc_config_path: "{{ matrix_bridge_appservice_irc_base_path }}/config"
|
||||||
matrix_appservice_irc_data_path: "{{ matrix_appservice_irc_base_path }}/data"
|
matrix_bridge_appservice_irc_data_path: "{{ matrix_bridge_appservice_irc_base_path }}/data"
|
||||||
|
|
||||||
matrix_appservice_irc_homeserver_url: ""
|
matrix_bridge_appservice_irc_homeserver_url: ""
|
||||||
matrix_appservice_irc_homeserver_domain: '{{ matrix_domain }}'
|
matrix_bridge_appservice_irc_homeserver_domain: '{{ matrix_domain }}'
|
||||||
|
|
||||||
# ircService.mediaProxy configuration for serving publicly accessible URLs to authenticated Matrix media
|
# ircService.mediaProxy configuration for serving publicly accessible URLs to authenticated Matrix media
|
||||||
matrix_appservice_irc_ircService_mediaProxy_bindPort: 11111 # noqa var-naming
|
matrix_bridge_appservice_irc_ircService_mediaProxy_bindPort: 11111 # noqa var-naming
|
||||||
matrix_appservice_irc_ircService_mediaProxy_publicUrl_scheme: https # noqa var-naming
|
matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_scheme: https # noqa var-naming
|
||||||
matrix_appservice_irc_ircService_mediaProxy_publicUrl_hostname: '{{ matrix_server_fqn_matrix }}' # noqa var-naming
|
matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_hostname: '{{ matrix_server_fqn_matrix }}' # noqa var-naming
|
||||||
matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix: '/irc/' # noqa var-naming
|
matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix: '/irc/' # noqa var-naming
|
||||||
matrix_appservice_irc_ircService_mediaProxy_publicUrl: "{{ matrix_appservice_irc_ircService_mediaProxy_publicUrl_scheme }}://{{ matrix_appservice_irc_ircService_mediaProxy_publicUrl_hostname }}{{ matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix }}" # noqa var-naming
|
matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl: "{{ matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_scheme }}://{{ matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_hostname }}{{ matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix }}" # noqa var-naming
|
||||||
|
|
||||||
matrix_appservice_irc_homeserver_enablePresence: true # noqa var-naming
|
matrix_bridge_appservice_irc_homeserver_enablePresence: true # noqa var-naming
|
||||||
matrix_appservice_irc_appservice_address: 'http://matrix-appservice-irc:9999'
|
matrix_bridge_appservice_irc_appservice_address: 'http://matrix-appservice-irc:9999'
|
||||||
|
|
||||||
matrix_appservice_irc_database_engine: nedb
|
matrix_bridge_appservice_irc_database_engine: nedb
|
||||||
matrix_appservice_irc_database_username: matrix_appservice_irc
|
matrix_bridge_appservice_irc_database_username: matrix_appservice_irc
|
||||||
matrix_appservice_irc_database_password: 'some-password'
|
matrix_bridge_appservice_irc_database_password: 'some-password'
|
||||||
matrix_appservice_irc_database_hostname: ''
|
matrix_bridge_appservice_irc_database_hostname: ''
|
||||||
matrix_appservice_irc_database_port: 5432
|
matrix_bridge_appservice_irc_database_port: 5432
|
||||||
matrix_appservice_irc_database_name: matrix_appservice_irc
|
matrix_bridge_appservice_irc_database_name: matrix_appservice_irc
|
||||||
matrix_appservice_irc_database_sslmode: disable
|
matrix_bridge_appservice_irc_database_sslmode: disable
|
||||||
|
|
||||||
# The name of the container network to use when importing a NeDB database into Postgres.
|
# The name of the container network to use when importing a NeDB database into Postgres.
|
||||||
# For Postgres not working in a container, this can be left empty.
|
# For Postgres not working in a container, this can be left empty.
|
||||||
matrix_appservice_irc_database_container_network: ''
|
matrix_bridge_appservice_irc_database_container_network: ''
|
||||||
|
|
||||||
# This is just the Postgres connection string, if Postgres is used.
|
# This is just the Postgres connection string, if Postgres is used.
|
||||||
# Naming clashes with `matrix_appservice_irc_database_connectionString` somewhat.
|
# Naming clashes with `matrix_bridge_appservice_irc_database_connectionString` somewhat.
|
||||||
matrix_appservice_irc_database_connection_string: 'postgresql://{{ matrix_appservice_irc_database_username }}:{{ matrix_appservice_irc_database_password }}@{{ matrix_appservice_irc_database_hostname }}:{{ matrix_appservice_irc_database_port }}/{{ matrix_appservice_irc_database_name }}?sslmode={{ matrix_appservice_irc_database_sslmode }}'
|
matrix_bridge_appservice_irc_database_connection_string: 'postgresql://{{ matrix_bridge_appservice_irc_database_username }}:{{ matrix_bridge_appservice_irc_database_password }}@{{ matrix_bridge_appservice_irc_database_hostname }}:{{ matrix_bridge_appservice_irc_database_port }}/{{ matrix_bridge_appservice_irc_database_name }}?sslmode={{ matrix_bridge_appservice_irc_database_sslmode }}'
|
||||||
|
|
||||||
# This is what actually goes into `database.connectionString` for the bridge.
|
# This is what actually goes into `database.connectionString` for the bridge.
|
||||||
matrix_appservice_irc_database_connectionString: |- # noqa var-naming
|
matrix_bridge_appservice_irc_database_connectionString: |- # noqa var-naming
|
||||||
{{
|
{{
|
||||||
{
|
{
|
||||||
'nedb': 'nedb:///data',
|
'nedb': 'nedb:///data',
|
||||||
'postgres': matrix_appservice_irc_database_connection_string,
|
'postgres': matrix_bridge_appservice_irc_database_connection_string,
|
||||||
}[matrix_appservice_irc_database_engine]
|
}[matrix_bridge_appservice_irc_database_engine]
|
||||||
}}
|
}}
|
||||||
|
|
||||||
matrix_appservice_irc_ircService_servers: [] # noqa var-naming
|
matrix_bridge_appservice_irc_ircService_servers: [] # noqa var-naming
|
||||||
|
|
||||||
# Example of `matrix_appservice_irc_ircService_servers` with one server (and all its options):
|
# Example of `matrix_bridge_appservice_irc_ircService_servers` with one server (and all its options):
|
||||||
#
|
#
|
||||||
# matrix_appservice_irc_ircService_servers:
|
# matrix_bridge_appservice_irc_ircService_servers:
|
||||||
# # The address of the server to connect to.
|
# # The address of the server to connect to.
|
||||||
# irc.example.com:
|
# irc.example.com:
|
||||||
# # A human-readable short name. This is used to label IRC status rooms
|
# # A human-readable short name. This is used to label IRC status rooms
|
||||||
@@ -471,68 +471,68 @@ matrix_appservice_irc_ircService_servers: [] # noqa var-naming
|
|||||||
# Controls whether the matrix-appservice-irc container exposes its HTTP port (tcp/9999 in the container).
|
# Controls whether the matrix-appservice-irc container exposes its HTTP port (tcp/9999 in the container).
|
||||||
#
|
#
|
||||||
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9999"), or empty string to not expose.
|
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9999"), or empty string to not expose.
|
||||||
matrix_appservice_irc_container_http_host_bind_port: ''
|
matrix_bridge_appservice_irc_container_http_host_bind_port: ''
|
||||||
|
|
||||||
# Controls whether the matrix-appservice-irc container exposes its media proxy HTTP port.
|
# Controls whether the matrix-appservice-irc container exposes its media proxy HTTP port.
|
||||||
#
|
#
|
||||||
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:11111"), or empty string to not expose.
|
# Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:11111"), or empty string to not expose.
|
||||||
matrix_appservice_irc_container_media_proxy_host_bind_port: ''
|
matrix_bridge_appservice_irc_container_media_proxy_host_bind_port: ''
|
||||||
|
|
||||||
matrix_appservice_irc_container_network: ""
|
matrix_bridge_appservice_irc_container_network: ""
|
||||||
|
|
||||||
matrix_appservice_irc_container_additional_networks: "{{ matrix_appservice_irc_container_additional_networks_auto + matrix_appservice_irc_container_additional_networks_custom }}"
|
matrix_bridge_appservice_irc_container_additional_networks: "{{ matrix_bridge_appservice_irc_container_additional_networks_auto + matrix_bridge_appservice_irc_container_additional_networks_custom }}"
|
||||||
matrix_appservice_irc_container_additional_networks_auto: []
|
matrix_bridge_appservice_irc_container_additional_networks_auto: []
|
||||||
matrix_appservice_irc_container_additional_networks_custom: []
|
matrix_bridge_appservice_irc_container_additional_networks_custom: []
|
||||||
|
|
||||||
# A list of extra arguments to pass to the container
|
# A list of extra arguments to pass to the container
|
||||||
matrix_appservice_irc_container_extra_arguments: []
|
matrix_bridge_appservice_irc_container_extra_arguments: []
|
||||||
|
|
||||||
# matrix_appservice_irc_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
|
# matrix_bridge_appservice_irc_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
|
||||||
# To inject your own other container labels, see `matrix_appservice_irc_container_labels_additional_labels`.
|
# To inject your own other container labels, see `matrix_bridge_appservice_irc_container_labels_additional_labels`.
|
||||||
matrix_appservice_irc_container_labels_traefik_enabled: true
|
matrix_bridge_appservice_irc_container_labels_traefik_enabled: true
|
||||||
matrix_appservice_irc_container_labels_traefik_docker_network: "{{ matrix_appservice_irc_container_network }}"
|
matrix_bridge_appservice_irc_container_labels_traefik_docker_network: "{{ matrix_bridge_appservice_irc_container_network }}"
|
||||||
matrix_appservice_irc_container_labels_traefik_entrypoints: web-secure
|
matrix_bridge_appservice_irc_container_labels_traefik_entrypoints: web-secure
|
||||||
matrix_appservice_irc_container_labels_traefik_tls_certResolver: default # noqa var-naming
|
matrix_bridge_appservice_irc_container_labels_traefik_tls_certResolver: default # noqa var-naming
|
||||||
|
|
||||||
# Controls whether Traefik labels for the media proxy will be applied
|
# Controls whether Traefik labels for the media proxy will be applied
|
||||||
matrix_appservice_irc_container_labels_media_proxy_enabled: true
|
matrix_bridge_appservice_irc_container_labels_media_proxy_enabled: true
|
||||||
# Derived from publicUrl_pathPrefix, stripping any trailing slash (unless it's just "/")
|
# Derived from publicUrl_pathPrefix, stripping any trailing slash (unless it's just "/")
|
||||||
matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix: "{{ '/' if matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix == '/' else matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix.rstrip('/') }}"
|
matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix: "{{ '/' if matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix == '/' else matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix.rstrip('/') }}"
|
||||||
matrix_appservice_irc_container_labels_media_proxy_traefik_rule: "Host(`{{ matrix_appservice_irc_ircService_mediaProxy_publicUrl_hostname }}`) && PathPrefix(`{{ matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix }}`)"
|
matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_rule: "Host(`{{ matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_hostname }}`) && PathPrefix(`{{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix }}`)"
|
||||||
matrix_appservice_irc_container_labels_media_proxy_traefik_priority: 2000
|
matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_priority: 2000
|
||||||
matrix_appservice_irc_container_labels_media_proxy_traefik_entrypoints: "{{ matrix_appservice_irc_container_labels_traefik_entrypoints }}"
|
matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_entrypoints: "{{ matrix_bridge_appservice_irc_container_labels_traefik_entrypoints }}"
|
||||||
matrix_appservice_irc_container_labels_media_proxy_traefik_tls: "{{ matrix_appservice_irc_container_labels_media_proxy_traefik_entrypoints != 'web' }}"
|
matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_tls: "{{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_entrypoints != 'web' }}"
|
||||||
matrix_appservice_irc_container_labels_media_proxy_traefik_tls_certResolver: "{{ matrix_appservice_irc_container_labels_traefik_tls_certResolver }}" # noqa var-naming
|
matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_tls_certResolver: "{{ matrix_bridge_appservice_irc_container_labels_traefik_tls_certResolver }}" # noqa var-naming
|
||||||
|
|
||||||
# matrix-appservice-irc container additional labels
|
# matrix-appservice-irc container additional labels
|
||||||
matrix_appservice_irc_container_labels_additional_labels: ''
|
matrix_bridge_appservice_irc_container_labels_additional_labels: ''
|
||||||
|
|
||||||
# List of systemd services that matrix-appservice-irc.service depends on.
|
# List of systemd services that matrix-appservice-irc.service depends on.
|
||||||
matrix_appservice_irc_systemd_required_services_list: "{{ matrix_appservice_irc_systemd_required_services_list_default + matrix_appservice_irc_systemd_required_services_list_auto + matrix_appservice_irc_systemd_required_services_list_custom }}"
|
matrix_bridge_appservice_irc_systemd_required_services_list: "{{ matrix_bridge_appservice_irc_systemd_required_services_list_default + matrix_bridge_appservice_irc_systemd_required_services_list_auto + matrix_bridge_appservice_irc_systemd_required_services_list_custom }}"
|
||||||
matrix_appservice_irc_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
|
matrix_bridge_appservice_irc_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
|
||||||
matrix_appservice_irc_systemd_required_services_list_auto: []
|
matrix_bridge_appservice_irc_systemd_required_services_list_auto: []
|
||||||
matrix_appservice_irc_systemd_required_services_list_custom: []
|
matrix_bridge_appservice_irc_systemd_required_services_list_custom: []
|
||||||
|
|
||||||
# List of systemd services that matrix-appservice-irc.service wants
|
# List of systemd services that matrix-appservice-irc.service wants
|
||||||
matrix_appservice_irc_systemd_wanted_services_list: []
|
matrix_bridge_appservice_irc_systemd_wanted_services_list: []
|
||||||
|
|
||||||
matrix_appservice_irc_appservice_token: ''
|
matrix_bridge_appservice_irc_appservice_token: ''
|
||||||
matrix_appservice_irc_homeserver_token: ''
|
matrix_bridge_appservice_irc_homeserver_token: ''
|
||||||
|
|
||||||
matrix_appservice_irc_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
|
matrix_bridge_appservice_irc_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
|
||||||
|
|
||||||
matrix_appservice_irc_configuration_extension_yaml: |
|
matrix_bridge_appservice_irc_configuration_extension_yaml: |
|
||||||
# Your custom YAML configuration for Appservice IRC servers goes here.
|
# Your custom YAML configuration for Appservice IRC servers goes here.
|
||||||
# This configuration extends the default starting configuration (`matrix_appservice_irc_configuration_yaml`).
|
# This configuration extends the default starting configuration (`matrix_bridge_appservice_irc_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_appservice_irc_configuration_yaml`.
|
# completely redefining `matrix_bridge_appservice_irc_configuration_yaml`.
|
||||||
|
|
||||||
matrix_appservice_irc_configuration_extension: "{{ matrix_appservice_irc_configuration_extension_yaml | from_yaml if matrix_appservice_irc_configuration_extension_yaml | from_yaml is mapping else {} }}"
|
matrix_bridge_appservice_irc_configuration_extension: "{{ matrix_bridge_appservice_irc_configuration_extension_yaml | from_yaml if matrix_bridge_appservice_irc_configuration_extension_yaml | from_yaml is mapping else {} }}"
|
||||||
|
|
||||||
matrix_appservice_irc_configuration: "{{ matrix_appservice_irc_configuration_yaml | from_yaml | combine(matrix_appservice_irc_configuration_extension, recursive=True) }}"
|
matrix_bridge_appservice_irc_configuration: "{{ matrix_bridge_appservice_irc_configuration_yaml | from_yaml | combine(matrix_bridge_appservice_irc_configuration_extension, recursive=True) }}"
|
||||||
|
|
||||||
# The original registration.yaml file generated by AppService IRC is merged with this config override,
|
# The original registration.yaml file generated by AppService IRC is merged with this config override,
|
||||||
# to produce the final registration.yaml file ultimately used by both the bridge and the homeserver.
|
# to produce the final registration.yaml file ultimately used by both the bridge and the homeserver.
|
||||||
@@ -542,14 +542,14 @@ matrix_appservice_irc_configuration: "{{ matrix_appservice_irc_configuration_yam
|
|||||||
# - always having the same AS/HS token and appservice ID in the registration.yaml file
|
# - always having the same AS/HS token and appservice ID in the registration.yaml file
|
||||||
#
|
#
|
||||||
# Learn more about this in `setup_install.yml`
|
# Learn more about this in `setup_install.yml`
|
||||||
matrix_appservice_irc_registration_override_yaml: |
|
matrix_bridge_appservice_irc_registration_override_yaml: |
|
||||||
id: appservice-irc
|
id: appservice-irc
|
||||||
as_token: "{{ matrix_appservice_irc_appservice_token }}"
|
as_token: "{{ matrix_bridge_appservice_irc_appservice_token }}"
|
||||||
hs_token: "{{ matrix_appservice_irc_homeserver_token }}"
|
hs_token: "{{ matrix_bridge_appservice_irc_homeserver_token }}"
|
||||||
|
|
||||||
matrix_appservice_irc_registration_override: "{{ matrix_appservice_irc_registration_override_yaml | from_yaml }}"
|
matrix_bridge_appservice_irc_registration_override: "{{ matrix_bridge_appservice_irc_registration_override_yaml | from_yaml }}"
|
||||||
|
|
||||||
# matrix_appservice_irc_restart_necessary controls whether the service
|
# matrix_bridge_appservice_irc_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).
|
||||||
#
|
#
|
||||||
@@ -557,4 +557,4 @@ matrix_appservice_irc_registration_override: "{{ matrix_appservice_irc_registrat
|
|||||||
# 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_appservice_irc_restart_necessary: false
|
matrix_bridge_appservice_irc_restart_necessary: false
|
||||||
|
|||||||
@@ -12,15 +12,15 @@
|
|||||||
- install-all
|
- install-all
|
||||||
- install-appservice-irc
|
- install-appservice-irc
|
||||||
block:
|
block:
|
||||||
- when: matrix_appservice_irc_enabled | bool
|
- when: matrix_bridge_appservice_irc_enabled | bool
|
||||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
|
|
||||||
- when: matrix_appservice_irc_enabled | bool
|
- when: matrix_bridge_appservice_irc_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-appservice-irc
|
- setup-appservice-irc
|
||||||
block:
|
block:
|
||||||
- when: not matrix_appservice_irc_enabled | bool
|
- when: not matrix_bridge_appservice_irc_enabled | bool
|
||||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
|
|||||||
@@ -38,13 +38,13 @@
|
|||||||
- name: Check existence of matrix-appservice-irc service
|
- name: Check existence of matrix-appservice-irc service
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
||||||
register: matrix_appservice_irc_service_stat
|
register: matrix_bridge_appservice_irc_service_stat
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-irc is stopped
|
- name: Ensure matrix-appservice-irc is stopped
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: matrix-appservice-irc
|
name: matrix-appservice-irc
|
||||||
state: stopped
|
state: stopped
|
||||||
when: "matrix_appservice_irc_service_stat.stat.exists"
|
when: "matrix_bridge_appservice_irc_service_stat.stat.exists"
|
||||||
|
|
||||||
- name: Import appservice-irc NeDB database into Postgres
|
- name: Import appservice-irc NeDB database into Postgres
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
@@ -53,25 +53,25 @@
|
|||||||
--rm
|
--rm
|
||||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
||||||
--cap-drop=ALL
|
--cap-drop=ALL
|
||||||
{% if matrix_appservice_irc_database_container_network %}
|
{% if matrix_bridge_appservice_irc_database_container_network %}
|
||||||
--network={{ matrix_appservice_irc_database_container_network }}
|
--network={{ matrix_bridge_appservice_irc_database_container_network }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
--mount type=bind,src={{ matrix_appservice_irc_data_path }},dst=/data
|
--mount type=bind,src={{ matrix_bridge_appservice_irc_data_path }},dst=/data
|
||||||
--entrypoint=/bin/sh
|
--entrypoint=/bin/sh
|
||||||
{{ matrix_appservice_irc_container_image }}
|
{{ matrix_bridge_appservice_irc_container_image }}
|
||||||
-c
|
-c
|
||||||
'/usr/local/bin/node /app/lib/scripts/migrate-db-to-pgres.js --dbdir /data --privateKey /data/passkey.pem --connectionString {{ matrix_appservice_irc_database_connection_string }}'
|
'/usr/local/bin/node /app/lib/scripts/migrate-db-to-pgres.js --dbdir /data --privateKey /data/passkey.pem --connectionString {{ matrix_bridge_appservice_irc_database_connection_string }}'
|
||||||
register: matrix_appservice_irc_import_nedb_to_postgres_result
|
register: matrix_bridge_appservice_irc_import_nedb_to_postgres_result
|
||||||
changed_when: matrix_appservice_irc_import_nedb_to_postgres_result.rc == 0
|
changed_when: matrix_bridge_appservice_irc_import_nedb_to_postgres_result.rc == 0
|
||||||
|
|
||||||
- name: Archive NeDB database files
|
- name: Archive NeDB database files
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "mv {{ matrix_appservice_irc_data_path }}/{{ item }} {{ matrix_appservice_irc_data_path }}/{{ item }}.backup"
|
cmd: "mv {{ matrix_bridge_appservice_irc_data_path }}/{{ item }} {{ matrix_bridge_appservice_irc_data_path }}/{{ item }}.backup"
|
||||||
with_items:
|
with_items:
|
||||||
- rooms.db
|
- rooms.db
|
||||||
- users.db
|
- users.db
|
||||||
register: matrix_appservice_irc_import_nedb_to_postgres_move_result
|
register: matrix_bridge_appservice_irc_import_nedb_to_postgres_move_result
|
||||||
changed_when: matrix_appservice_irc_import_nedb_to_postgres_move_result.rc == 0
|
changed_when: matrix_bridge_appservice_irc_import_nedb_to_postgres_move_result.rc == 0
|
||||||
|
|
||||||
- name: Inject result
|
- name: Inject result
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
@@ -80,6 +80,6 @@
|
|||||||
devture_playbook_runtime_messages_list | default([])
|
devture_playbook_runtime_messages_list | default([])
|
||||||
+
|
+
|
||||||
[
|
[
|
||||||
"Note: Your appservice-irc database files have been imported into Postgres. The original database files have been moved from `" + matrix_appservice_irc_data_path + "/*.db` to `" + matrix_appservice_irc_data_path + "/*.db.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete these files."
|
"Note: Your appservice-irc database files have been imported into Postgres. The original database files have been moved from `" + matrix_bridge_appservice_irc_data_path + "/*.db` to `" + matrix_bridge_appservice_irc_data_path + "/*.db.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete these files."
|
||||||
]
|
]
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -26,18 +26,18 @@
|
|||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- {path: "{{ matrix_appservice_irc_base_path }}", when: true}
|
- {path: "{{ matrix_bridge_appservice_irc_base_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_irc_config_path }}", when: true}
|
- {path: "{{ matrix_bridge_appservice_irc_config_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_irc_data_path }}", when: true}
|
- {path: "{{ matrix_bridge_appservice_irc_data_path }}", when: true}
|
||||||
- {path: "{{ matrix_appservice_irc_container_src_files_path }}", when: "{{ matrix_appservice_irc_container_image_self_build }}"}
|
- {path: "{{ matrix_bridge_appservice_irc_container_src_files_path }}", when: "{{ matrix_bridge_appservice_irc_container_image_self_build }}"}
|
||||||
when: item.when | bool
|
when: item.when | bool
|
||||||
|
|
||||||
- name: Check if an old passkey file already exists
|
- name: Check if an old passkey file already exists
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ matrix_appservice_irc_base_path }}/passkey.pem"
|
path: "{{ matrix_bridge_appservice_irc_base_path }}/passkey.pem"
|
||||||
register: matrix_appservice_irc_stat_passkey
|
register: matrix_bridge_appservice_irc_stat_passkey
|
||||||
|
|
||||||
- when: "matrix_appservice_irc_stat_passkey.stat.exists"
|
- when: "matrix_bridge_appservice_irc_stat_passkey.stat.exists"
|
||||||
block:
|
block:
|
||||||
- name: (Data relocation) Ensure matrix-appservice-irc.service is stopped
|
- name: (Data relocation) Ensure matrix-appservice-irc.service is stopped
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
@@ -48,104 +48,104 @@
|
|||||||
|
|
||||||
- name: (Data relocation) Move AppService IRC passkey.pem file to ./data directory
|
- name: (Data relocation) Move AppService IRC passkey.pem file to ./data directory
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "mv {{ matrix_appservice_irc_base_path }}/passkey.pem {{ matrix_appservice_irc_data_path }}/passkey.pem"
|
cmd: "mv {{ matrix_bridge_appservice_irc_base_path }}/passkey.pem {{ matrix_bridge_appservice_irc_data_path }}/passkey.pem"
|
||||||
register: matrix_appservice_irc_move_passkey_result
|
register: matrix_bridge_appservice_irc_move_passkey_result
|
||||||
changed_when: matrix_appservice_irc_move_passkey_result.rc == 0
|
changed_when: matrix_bridge_appservice_irc_move_passkey_result.rc == 0
|
||||||
|
|
||||||
- name: (Data relocation) Move AppService IRC database files to ./data directory
|
- name: (Data relocation) Move AppService IRC database files to ./data directory
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "mv {{ matrix_appservice_irc_base_path }}/{{ item }} {{ matrix_appservice_irc_data_path }}/{{ item }}"
|
cmd: "mv {{ matrix_bridge_appservice_irc_base_path }}/{{ item }} {{ matrix_bridge_appservice_irc_data_path }}/{{ item }}"
|
||||||
register: matrix_appservice_irc_move_dbs_result
|
register: matrix_bridge_appservice_irc_move_dbs_result
|
||||||
changed_when: matrix_appservice_irc_move_dbs_result.rc == 0
|
changed_when: matrix_bridge_appservice_irc_move_dbs_result.rc == 0
|
||||||
with_items:
|
with_items:
|
||||||
- rooms.db
|
- rooms.db
|
||||||
- users.db
|
- users.db
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
- ansible.builtin.set_fact:
|
||||||
matrix_appservice_irc_migration_requires_restart: false
|
matrix_bridge_appservice_irc_migration_requires_restart: false
|
||||||
|
|
||||||
- when: "matrix_appservice_irc_database_engine == 'postgres'"
|
- when: "matrix_bridge_appservice_irc_database_engine == 'postgres'"
|
||||||
block:
|
block:
|
||||||
- name: Check if a nedb database already exists
|
- name: Check if a nedb database already exists
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ matrix_appservice_irc_data_path }}/users.db"
|
path: "{{ matrix_bridge_appservice_irc_data_path }}/users.db"
|
||||||
register: matrix_appservice_irc_nedb_database_path_local_stat_result
|
register: matrix_bridge_appservice_irc_nedb_database_path_local_stat_result
|
||||||
|
|
||||||
- when: "matrix_appservice_irc_nedb_database_path_local_stat_result.stat.exists | bool"
|
- when: "matrix_bridge_appservice_irc_nedb_database_path_local_stat_result.stat.exists | bool"
|
||||||
block:
|
block:
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/migrate_nedb_to_postgres.yml"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/migrate_nedb_to_postgres.yml"
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
- ansible.builtin.set_fact:
|
||||||
matrix_appservice_irc_migration_requires_restart: true
|
matrix_bridge_appservice_irc_migration_requires_restart: true
|
||||||
|
|
||||||
- name: Ensure Appservice IRC image is pulled
|
- name: Ensure Appservice IRC image is pulled
|
||||||
community.docker.docker_image_pull:
|
community.docker.docker_image_pull:
|
||||||
name: "{{ matrix_appservice_irc_container_image }}"
|
name: "{{ matrix_bridge_appservice_irc_container_image }}"
|
||||||
pull: always
|
pull: always
|
||||||
when: "matrix_appservice_irc_enabled | bool and not matrix_appservice_irc_container_image_self_build | bool"
|
when: "matrix_bridge_appservice_irc_enabled | bool and not matrix_bridge_appservice_irc_container_image_self_build | bool"
|
||||||
register: matrix_appservice_irc_container_image_pull_result
|
register: matrix_bridge_appservice_irc_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_appservice_irc_container_image_pull_result is not failed
|
until: matrix_bridge_appservice_irc_container_image_pull_result is not failed
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-irc repository is present when self-building
|
- name: Ensure matrix-appservice-irc repository is present when self-building
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: "{{ matrix_appservice_irc_container_repo }}"
|
repo: "{{ matrix_bridge_appservice_irc_container_repo }}"
|
||||||
version: "{{ matrix_appservice_irc_container_repo_version }}"
|
version: "{{ matrix_bridge_appservice_irc_container_repo_version }}"
|
||||||
dest: "{{ matrix_appservice_irc_container_src_files_path }}"
|
dest: "{{ matrix_bridge_appservice_irc_container_src_files_path }}"
|
||||||
force: "yes"
|
force: "yes"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
register: matrix_appservice_irc_git_pull_results
|
register: matrix_bridge_appservice_irc_git_pull_results
|
||||||
when: "matrix_appservice_irc_enabled | bool and matrix_appservice_irc_container_image_self_build | bool"
|
when: "matrix_bridge_appservice_irc_enabled | bool and matrix_bridge_appservice_irc_container_image_self_build | bool"
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-irc Docker image is built
|
- name: Ensure matrix-appservice-irc Docker image is built
|
||||||
community.docker.docker_image_build:
|
community.docker.docker_image_build:
|
||||||
name: "{{ matrix_appservice_irc_container_image }}"
|
name: "{{ matrix_bridge_appservice_irc_container_image }}"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
path: "{{ matrix_appservice_irc_container_src_files_path }}"
|
path: "{{ matrix_bridge_appservice_irc_container_src_files_path }}"
|
||||||
pull: true
|
pull: true
|
||||||
rebuild: "{{ 'always' if matrix_appservice_irc_git_pull_results.changed | bool else 'never' }}"
|
rebuild: "{{ 'always' if matrix_bridge_appservice_irc_git_pull_results.changed | bool else 'never' }}"
|
||||||
when: "matrix_appservice_irc_enabled | bool and matrix_appservice_irc_container_image_self_build | bool and matrix_appservice_irc_git_pull_results.changed"
|
when: "matrix_bridge_appservice_irc_enabled | bool and matrix_bridge_appservice_irc_container_image_self_build | bool and matrix_bridge_appservice_irc_git_pull_results.changed"
|
||||||
register: matrix_appservice_irc_container_image_build_result
|
register: matrix_bridge_appservice_irc_container_image_build_result
|
||||||
|
|
||||||
- name: Ensure Matrix Appservice IRC config installed
|
- name: Ensure Matrix Appservice IRC config installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_irc_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_bridge_appservice_irc_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_irc_config_path }}/config.yaml"
|
dest: "{{ matrix_bridge_appservice_irc_config_path }}/config.yaml"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_irc_config_result
|
register: matrix_bridge_appservice_irc_config_result
|
||||||
|
|
||||||
- name: Ensure Matrix Appservice IRC labels file installed
|
- name: Ensure Matrix Appservice IRC labels file installed
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ role_path }}/templates/labels.j2"
|
src: "{{ role_path }}/templates/labels.j2"
|
||||||
dest: "{{ matrix_appservice_irc_base_path }}/labels"
|
dest: "{{ matrix_bridge_appservice_irc_base_path }}/labels"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_irc_labels_result
|
register: matrix_bridge_appservice_irc_labels_result
|
||||||
|
|
||||||
- name: Generate Appservice IRC passkey if it doesn't exist
|
- name: Generate Appservice IRC passkey if it doesn't exist
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: "{{ matrix_host_command_openssl }} genpkey -out {{ matrix_appservice_irc_data_path }}/passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048"
|
cmd: "{{ matrix_host_command_openssl }} genpkey -out {{ matrix_bridge_appservice_irc_data_path }}/passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048"
|
||||||
creates: "{{ matrix_appservice_irc_data_path }}/passkey.pem"
|
creates: "{{ matrix_bridge_appservice_irc_data_path }}/passkey.pem"
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ matrix_user_name }}"
|
become_user: "{{ matrix_user_name }}"
|
||||||
|
|
||||||
- name: Check if an authenticated media signing key exists
|
- name: Check if an authenticated media signing key exists
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ matrix_appservice_irc_data_path }}/auth-media.jwk"
|
path: "{{ matrix_bridge_appservice_irc_data_path }}/auth-media.jwk"
|
||||||
register: matrix_appservice_irc_stat_auth_media_key
|
register: matrix_bridge_appservice_irc_stat_auth_media_key
|
||||||
|
|
||||||
- when: not matrix_appservice_irc_stat_auth_media_key.stat.exists
|
- when: not matrix_bridge_appservice_irc_stat_auth_media_key.stat.exists
|
||||||
block:
|
block:
|
||||||
- name: Generate IRC appservice signing key for authenticated media
|
- name: Generate IRC appservice signing key for authenticated media
|
||||||
community.docker.docker_container:
|
community.docker.docker_container:
|
||||||
name: "create-auth-media-jwk-key"
|
name: "create-auth-media-jwk-key"
|
||||||
image: "{{ matrix_appservice_irc_container_image }}"
|
image: "{{ matrix_bridge_appservice_irc_container_image }}"
|
||||||
cleanup: true
|
cleanup: true
|
||||||
network_mode: none
|
network_mode: none
|
||||||
entrypoint: "/usr/local/bin/node"
|
entrypoint: "/usr/local/bin/node"
|
||||||
@@ -160,12 +160,12 @@
|
|||||||
}
|
}
|
||||||
main().then(() => process.exit(0)).catch(err => { throw err });"
|
main().then(() => process.exit(0)).catch(err => { throw err });"
|
||||||
detach: false
|
detach: false
|
||||||
register: matrix_appservice_irc_jwk_result
|
register: matrix_bridge_appservice_irc_jwk_result
|
||||||
|
|
||||||
- name: Write auth media signing key to file
|
- name: Write auth media signing key to file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_irc_jwk_result.container.Output }}"
|
content: "{{ matrix_bridge_appservice_irc_jwk_result.container.Output }}"
|
||||||
dest: "{{ matrix_appservice_irc_data_path }}/auth-media.jwk"
|
dest: "{{ matrix_bridge_appservice_irc_data_path }}/auth-media.jwk"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
# Fix it.
|
# Fix it.
|
||||||
- name: (Migration) Ensure Appservice IRC passkey permissions are okay
|
- name: (Migration) Ensure Appservice IRC passkey permissions are okay
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ matrix_appservice_irc_data_path }}/passkey.pem"
|
path: "{{ matrix_bridge_appservice_irc_data_path }}/passkey.pem"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
@@ -203,10 +203,10 @@
|
|||||||
{{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-irc-gen
|
{{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-irc-gen
|
||||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }}
|
||||||
--cap-drop=ALL
|
--cap-drop=ALL
|
||||||
--mount type=bind,src={{ matrix_appservice_irc_config_path }},dst=/config
|
--mount type=bind,src={{ matrix_bridge_appservice_irc_config_path }},dst=/config
|
||||||
--mount type=bind,src={{ matrix_appservice_irc_data_path }},dst=/data
|
--mount type=bind,src={{ matrix_bridge_appservice_irc_data_path }},dst=/data
|
||||||
--entrypoint=/bin/bash
|
--entrypoint=/bin/bash
|
||||||
{{ matrix_appservice_irc_container_image }}
|
{{ matrix_bridge_appservice_irc_container_image }}
|
||||||
-c
|
-c
|
||||||
'node app.js
|
'node app.js
|
||||||
-r
|
-r
|
||||||
@@ -218,37 +218,37 @@
|
|||||||
|
|
||||||
- name: Read Appservice IRC registration-template.yaml
|
- name: Read Appservice IRC registration-template.yaml
|
||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "{{ matrix_appservice_irc_config_path }}/registration-template.yaml"
|
src: "{{ matrix_bridge_appservice_irc_config_path }}/registration-template.yaml"
|
||||||
register: matrix_appservice_irc_registration_template_slurp
|
register: matrix_bridge_appservice_irc_registration_template_slurp
|
||||||
|
|
||||||
- name: Remove unnecessary Appservice IRC registration-template.yaml
|
- name: Remove unnecessary Appservice IRC registration-template.yaml
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ matrix_appservice_irc_config_path }}/registration-template.yaml"
|
path: "{{ matrix_bridge_appservice_irc_config_path }}/registration-template.yaml"
|
||||||
state: absent
|
state: absent
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Parse registration-template.yaml
|
- name: Parse registration-template.yaml
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
matrix_appservice_irc_registration_template: "{{ matrix_appservice_irc_registration_template_slurp['content'] | b64decode | from_yaml }}"
|
matrix_bridge_appservice_irc_registration_template: "{{ matrix_bridge_appservice_irc_registration_template_slurp['content'] | b64decode | from_yaml }}"
|
||||||
|
|
||||||
- name: Combine registration-template.yaml and own registration override config
|
- name: Combine registration-template.yaml and own registration override config
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
matrix_appservice_irc_registration: "{{ matrix_appservice_irc_registration_template | combine(matrix_appservice_irc_registration_override, recursive=True) }}"
|
matrix_bridge_appservice_irc_registration: "{{ matrix_bridge_appservice_irc_registration_template | combine(matrix_bridge_appservice_irc_registration_override, recursive=True) }}"
|
||||||
|
|
||||||
- name: Ensure Appservice IRC registration.yaml installed
|
- name: Ensure Appservice IRC registration.yaml installed
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ matrix_appservice_irc_registration | to_nice_yaml(indent=2, width=999999) }}"
|
content: "{{ matrix_bridge_appservice_irc_registration | to_nice_yaml(indent=2, width=999999) }}"
|
||||||
dest: "{{ matrix_appservice_irc_config_path }}/registration.yaml"
|
dest: "{{ matrix_bridge_appservice_irc_config_path }}/registration.yaml"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
owner: "{{ matrix_user_name }}"
|
owner: "{{ matrix_user_name }}"
|
||||||
group: "{{ matrix_group_name }}"
|
group: "{{ matrix_group_name }}"
|
||||||
register: matrix_appservice_irc_registration_result
|
register: matrix_bridge_appservice_irc_registration_result
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-irc container network is created
|
- name: Ensure matrix-appservice-irc container network is created
|
||||||
when: matrix_appservice_irc_container_network != 'host'
|
when: matrix_bridge_appservice_irc_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_appservice_irc_container_network }}"
|
name: "{{ matrix_bridge_appservice_irc_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 }}"
|
||||||
|
|
||||||
@@ -257,19 +257,19 @@
|
|||||||
src: "{{ role_path }}/templates/systemd/matrix-appservice-irc.service.j2"
|
src: "{{ role_path }}/templates/systemd/matrix-appservice-irc.service.j2"
|
||||||
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
register: matrix_appservice_irc_systemd_service_result
|
register: matrix_bridge_appservice_irc_systemd_service_result
|
||||||
|
|
||||||
- name: Determine whether matrix-appservice-irc needs a restart
|
- name: Determine whether matrix-appservice-irc needs a restart
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
matrix_appservice_irc_restart_necessary: >-
|
matrix_bridge_appservice_irc_restart_necessary: >-
|
||||||
{{
|
{{
|
||||||
matrix_appservice_irc_migration_requires_restart | default(false)
|
matrix_bridge_appservice_irc_migration_requires_restart | default(false)
|
||||||
or matrix_appservice_irc_config_result.changed | default(false)
|
or matrix_bridge_appservice_irc_config_result.changed | default(false)
|
||||||
or matrix_appservice_irc_labels_result.changed | default(false)
|
or matrix_bridge_appservice_irc_labels_result.changed | default(false)
|
||||||
or matrix_appservice_irc_registration_result.changed | default(false)
|
or matrix_bridge_appservice_irc_registration_result.changed | default(false)
|
||||||
or matrix_appservice_irc_systemd_service_result.changed | default(false)
|
or matrix_bridge_appservice_irc_systemd_service_result.changed | default(false)
|
||||||
or matrix_appservice_irc_container_image_pull_result.changed | default(false)
|
or matrix_bridge_appservice_irc_container_image_pull_result.changed | default(false)
|
||||||
or matrix_appservice_irc_container_image_build_result.changed | default(false)
|
or matrix_bridge_appservice_irc_container_image_build_result.changed | default(false)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
- name: Ensure matrix-appservice-irc.service restarted, if necessary
|
- name: Ensure matrix-appservice-irc.service restarted, if necessary
|
||||||
@@ -277,4 +277,4 @@
|
|||||||
name: "matrix-appservice-irc.service"
|
name: "matrix-appservice-irc.service"
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
when: "matrix_appservice_irc_migration_requires_restart | bool"
|
when: "matrix_bridge_appservice_irc_migration_requires_restart | bool"
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
- name: Check existence of matrix-appservice-irc service
|
- name: Check existence of matrix-appservice-irc service
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
|
||||||
register: matrix_appservice_irc_service_stat
|
register: matrix_bridge_appservice_irc_service_stat
|
||||||
|
|
||||||
- when: matrix_appservice_irc_service_stat.stat.exists | bool
|
- when: matrix_bridge_appservice_irc_service_stat.stat.exists | bool
|
||||||
block:
|
block:
|
||||||
- name: Ensure matrix-appservice-irc is stopped
|
- name: Ensure matrix-appservice-irc is stopped
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
|
|||||||
@@ -13,20 +13,20 @@
|
|||||||
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
|
||||||
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
|
||||||
with_items:
|
with_items:
|
||||||
- {'old': 'matrix_appservice_irc_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_irc_container_http_host_bind_port>'}
|
- {'old': 'matrix_bridge_appservice_irc_container_expose_client_server_api_port', 'new': '<superseded by matrix_bridge_appservice_irc_container_http_host_bind_port>'}
|
||||||
- {'old': 'matrix_appservice_irc_container_self_build', 'new': 'matrix_appservice_irc_container_image_self_build'}
|
- {'old': 'matrix_bridge_appservice_irc_container_self_build', 'new': 'matrix_bridge_appservice_irc_container_image_self_build'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_image_name_prefix', 'new': 'matrix_appservice_irc_container_image_registry_prefix'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_image_name_prefix', 'new': 'matrix_bridge_appservice_irc_container_image_registry_prefix'}
|
||||||
- {'old': 'matrix_appservice_irc_homeserver_media_url', 'new': '<removed; media proxying now uses matrix_appservice_irc_ircService_mediaProxy_publicUrl>'}
|
- {'old': 'matrix_bridge_appservice_irc_homeserver_media_url', 'new': '<removed; media proxying now uses matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl>'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_image', 'new': 'matrix_appservice_irc_container_image'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_image', 'new': 'matrix_bridge_appservice_irc_container_image'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_image_force_pull', 'new': 'matrix_appservice_irc_container_image_force_pull'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_image_force_pull', 'new': 'matrix_bridge_appservice_irc_container_image_force_pull'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_image_registry_prefix', 'new': 'matrix_appservice_irc_container_image_registry_prefix'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_image_registry_prefix', 'new': 'matrix_bridge_appservice_irc_container_image_registry_prefix'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_image_registry_prefix_upstream', 'new': 'matrix_appservice_irc_container_image_registry_prefix_upstream'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_image_registry_prefix_upstream', 'new': 'matrix_bridge_appservice_irc_container_image_registry_prefix_upstream'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_image_registry_prefix_upstream_default', 'new': 'matrix_appservice_irc_container_image_registry_prefix_upstream_default'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bridge_appservice_irc_container_image_registry_prefix_upstream_default'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_image_tag', 'new': 'matrix_appservice_irc_container_image_tag'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_image_tag', 'new': 'matrix_bridge_appservice_irc_container_image_tag'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_repo', 'new': 'matrix_appservice_irc_container_repo'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_repo', 'new': 'matrix_bridge_appservice_irc_container_repo'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_repo_version', 'new': 'matrix_appservice_irc_container_repo_version'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_repo_version', 'new': 'matrix_bridge_appservice_irc_container_repo_version'}
|
||||||
- {'old': 'matrix_appservice_irc_docker_src_files_path', 'new': 'matrix_appservice_irc_container_src_files_path'}
|
- {'old': 'matrix_bridge_appservice_irc_docker_src_files_path', 'new': 'matrix_bridge_appservice_irc_container_src_files_path'}
|
||||||
- {'old': 'matrix_appservice_irc_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
- {'old': 'matrix_bridge_appservice_irc_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
||||||
|
|
||||||
- name: Fail if required appservice-irc settings not defined
|
- name: Fail if required appservice-irc settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
@@ -34,16 +34,16 @@
|
|||||||
You need to define a required configuration setting (`{{ item.name }}`).
|
You need to define a required configuration setting (`{{ item.name }}`).
|
||||||
when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
|
when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
|
||||||
with_items:
|
with_items:
|
||||||
- {'name': 'matrix_appservice_irc_appservice_token', when: true}
|
- {'name': 'matrix_bridge_appservice_irc_appservice_token', when: true}
|
||||||
- {'name': 'matrix_appservice_irc_homeserver_url', when: true}
|
- {'name': 'matrix_bridge_appservice_irc_homeserver_url', when: true}
|
||||||
- {'name': 'matrix_appservice_irc_homeserver_token', when: true}
|
- {'name': 'matrix_bridge_appservice_irc_homeserver_token', when: true}
|
||||||
- {'name': 'matrix_appservice_irc_database_hostname', when: "{{ matrix_appservice_irc_database_engine == 'postgres' }}"}
|
- {'name': 'matrix_bridge_appservice_irc_database_hostname', when: "{{ matrix_bridge_appservice_irc_database_engine == 'postgres' }}"}
|
||||||
- {'name': 'matrix_appservice_irc_container_network', when: true}
|
- {'name': 'matrix_bridge_appservice_irc_container_network', when: true}
|
||||||
|
|
||||||
# Our base configuration (`matrix_appservice_irc_configuration_yaml`) is not enough to
|
# Our base configuration (`matrix_bridge_appservice_irc_configuration_yaml`) is not enough to
|
||||||
# let the playbook run without errors.
|
# let the playbook run without errors.
|
||||||
#
|
#
|
||||||
# Unless the final configuration (`matrix_appservice_irc_configuration`) contains an `ircService` definition,
|
# Unless the final configuration (`matrix_bridge_appservice_irc_configuration`) contains an `ircService` definition,
|
||||||
# we'd fail generating the registration.yaml file with a non-helpful error.
|
# we'd fail generating the registration.yaml file with a non-helpful error.
|
||||||
#
|
#
|
||||||
# This is a safety check to ensure we fail earlier and in a nicer way.
|
# This is a safety check to ensure we fail earlier and in a nicer way.
|
||||||
@@ -52,30 +52,30 @@
|
|||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
Your Appservice IRC configuration is incomplete (lacking an `ircService.servers` configuration).
|
Your Appservice IRC configuration is incomplete (lacking an `ircService.servers` configuration).
|
||||||
You need to define one or more servers by either using `matrix_appservice_irc_ircService_servers`
|
You need to define one or more servers by either using `matrix_bridge_appservice_irc_ircService_servers`
|
||||||
or by extending the base configuration with additional configuration in `matrix_appservice_irc_configuration_extension_yaml`.
|
or by extending the base configuration with additional configuration in `matrix_bridge_appservice_irc_configuration_extension_yaml`.
|
||||||
Overriding the whole bridge's configuration (`matrix_appservice_irc_configuration`) is yet another possibility.
|
Overriding the whole bridge's configuration (`matrix_bridge_appservice_irc_configuration`) is yet another possibility.
|
||||||
when: "matrix_appservice_irc_configuration.ircService.servers | length == 0"
|
when: "matrix_bridge_appservice_irc_configuration.ircService.servers | length == 0"
|
||||||
|
|
||||||
- name: Fail if matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix does not start with a slash
|
- name: Fail if matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix does not start with a slash
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix (`{{ matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix }}`) must start with a slash (e.g. `/` or `/irc/`).
|
matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix (`{{ matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix }}`) must start with a slash (e.g. `/` or `/irc/`).
|
||||||
when: "matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix[0] != '/'"
|
when: "matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix[0] != '/'"
|
||||||
|
|
||||||
- name: Fail if matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix does not end with a slash
|
- name: Fail if matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix does not end with a slash
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix (`{{ matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix }}`) must end with a slash (e.g. `/` or `/irc/`).
|
matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix (`{{ matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix }}`) must end with a slash (e.g. `/` or `/irc/`).
|
||||||
when: "matrix_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix[-1] != '/'"
|
when: "matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_pathPrefix[-1] != '/'"
|
||||||
|
|
||||||
- when: matrix_appservice_irc_container_labels_traefik_enabled | bool
|
- when: matrix_bridge_appservice_irc_container_labels_traefik_enabled | bool
|
||||||
block:
|
block:
|
||||||
# We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
|
# We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
|
||||||
# Knowing that the path_prefix does not end with a slash ensures we know how to set these routes up
|
# Knowing that the path_prefix does not end with a slash ensures we know how to set these routes up
|
||||||
# without having to do "does it end with a slash" checks elsewhere.
|
# without having to do "does it end with a slash" checks elsewhere.
|
||||||
- name: Fail if matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix ends with a slash
|
- name: Fail if matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix ends with a slash
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix (`{{ matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/irc`).
|
matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix (`{{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/irc`).
|
||||||
when: "matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix != '/' and matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix[-1] == '/'"
|
when: "matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix != '/' and matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix[-1] == '/'"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# Unless otherwise specified, these keys CANNOT be hot-reloaded.
|
# Unless otherwise specified, these keys CANNOT be hot-reloaded.
|
||||||
homeserver:
|
homeserver:
|
||||||
# The URL to the home server for client-server API calls
|
# The URL to the home server for client-server API calls
|
||||||
url: "{{ matrix_appservice_irc_homeserver_url }}"
|
url: "{{ matrix_bridge_appservice_irc_homeserver_url }}"
|
||||||
|
|
||||||
# Drop Matrix messages which are older than this number of seconds, according to
|
# Drop Matrix messages which are older than this number of seconds, according to
|
||||||
# the event's origin_server_ts.
|
# the event's origin_server_ts.
|
||||||
@@ -24,12 +24,12 @@ homeserver:
|
|||||||
|
|
||||||
# The 'domain' part for user IDs on this home server. Usually (but not always)
|
# The 'domain' part for user IDs on this home server. Usually (but not always)
|
||||||
# is the "domain name" part of the HS URL.
|
# is the "domain name" part of the HS URL.
|
||||||
domain: "{{ matrix_appservice_irc_homeserver_domain }}"
|
domain: "{{ matrix_bridge_appservice_irc_homeserver_domain }}"
|
||||||
|
|
||||||
# Should presence be enabled for Matrix clients on this bridge. If disabled on the
|
# Should presence be enabled for Matrix clients on this bridge. If disabled on the
|
||||||
# homeserver then it should also be disabled here to avoid excess traffic.
|
# homeserver then it should also be disabled here to avoid excess traffic.
|
||||||
# Default: true
|
# Default: true
|
||||||
enablePresence: {{ matrix_appservice_irc_homeserver_enablePresence|to_json }}
|
enablePresence: {{ matrix_bridge_appservice_irc_homeserver_enablePresence|to_json }}
|
||||||
|
|
||||||
# Which port should the appservice bind to. Can be overridden by the one provided in the
|
# Which port should the appservice bind to. Can be overridden by the one provided in the
|
||||||
# command line! Optional.
|
# command line! Optional.
|
||||||
@@ -62,7 +62,7 @@ ircService:
|
|||||||
|
|
||||||
# All server keys can be hot-reloaded, however existing IRC connections
|
# All server keys can be hot-reloaded, however existing IRC connections
|
||||||
# will not have changes applied to them.
|
# will not have changes applied to them.
|
||||||
servers: {{ matrix_appservice_irc_ircService_servers|to_json }}
|
servers: {{ matrix_bridge_appservice_irc_ircService_servers|to_json }}
|
||||||
|
|
||||||
# present relevant UI to the user. MSC2346
|
# present relevant UI to the user. MSC2346
|
||||||
bridgeInfoState:
|
bridgeInfoState:
|
||||||
@@ -141,9 +141,9 @@ ircService:
|
|||||||
# How long should the generated URLs be valid for
|
# How long should the generated URLs be valid for
|
||||||
ttlSeconds: 604800
|
ttlSeconds: 604800
|
||||||
# The port for the media proxy to listen on
|
# The port for the media proxy to listen on
|
||||||
bindPort: {{ matrix_appservice_irc_ircService_mediaProxy_bindPort | to_json }}
|
bindPort: {{ matrix_bridge_appservice_irc_ircService_mediaProxy_bindPort | to_json }}
|
||||||
# The publicly accessible URL to the media proxy
|
# The publicly accessible URL to the media proxy
|
||||||
publicUrl: {{ matrix_appservice_irc_ircService_mediaProxy_publicUrl | to_json }}
|
publicUrl: {{ matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl | to_json }}
|
||||||
|
|
||||||
# Options here are generally only applicable to large-scale bridges and may have
|
# Options here are generally only applicable to large-scale bridges and may have
|
||||||
# consequences greater than other options in this configuration file.
|
# consequences greater than other options in this configuration file.
|
||||||
@@ -162,8 +162,8 @@ advanced:
|
|||||||
# This key CANNOT be hot-reloaded.
|
# This key CANNOT be hot-reloaded.
|
||||||
database:
|
database:
|
||||||
# database engine (must be 'postgres' or 'nedb'). Default: nedb
|
# database engine (must be 'postgres' or 'nedb'). Default: nedb
|
||||||
engine: {{ matrix_appservice_irc_database_engine|to_json }}
|
engine: {{ matrix_bridge_appservice_irc_database_engine|to_json }}
|
||||||
# Either a PostgreSQL connection string, or a path to the NeDB storage directory.
|
# Either a PostgreSQL connection string, or a path to the NeDB storage directory.
|
||||||
# For postgres, it must start with postgres://
|
# For postgres, it must start with postgres://
|
||||||
# For NeDB, it must start with nedb://. The path is relative to the project directory.
|
# For NeDB, it must start with nedb://. The path is relative to the project directory.
|
||||||
connectionString: {{ matrix_appservice_irc_database_connectionString | to_json }}
|
connectionString: {{ matrix_bridge_appservice_irc_database_connectionString | to_json }}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ SPDX-FileCopyrightText: 2026 Slavi Pantaleev
|
|||||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% if matrix_appservice_irc_container_labels_traefik_enabled and matrix_appservice_irc_container_labels_media_proxy_enabled %}
|
{% if matrix_bridge_appservice_irc_container_labels_traefik_enabled and matrix_bridge_appservice_irc_container_labels_media_proxy_enabled %}
|
||||||
traefik.enable=true
|
traefik.enable=true
|
||||||
|
|
||||||
{% if matrix_appservice_irc_container_labels_traefik_docker_network %}
|
{% if matrix_bridge_appservice_irc_container_labels_traefik_docker_network %}
|
||||||
traefik.docker.network={{ matrix_appservice_irc_container_labels_traefik_docker_network }}
|
traefik.docker.network={{ matrix_bridge_appservice_irc_container_labels_traefik_docker_network }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
traefik.http.services.matrix-appservice-irc-media-proxy.loadbalancer.server.port={{ matrix_appservice_irc_ircService_mediaProxy_bindPort }}
|
traefik.http.services.matrix-appservice-irc-media-proxy.loadbalancer.server.port={{ matrix_bridge_appservice_irc_ircService_mediaProxy_bindPort }}
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# #
|
# #
|
||||||
@@ -23,34 +23,34 @@ traefik.http.services.matrix-appservice-irc-media-proxy.loadbalancer.server.port
|
|||||||
|
|
||||||
{% set middlewares = [] %}
|
{% set middlewares = [] %}
|
||||||
|
|
||||||
traefik.http.routers.matrix-appservice-irc-media-proxy.rule={{ matrix_appservice_irc_container_labels_media_proxy_traefik_rule }}
|
traefik.http.routers.matrix-appservice-irc-media-proxy.rule={{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_rule }}
|
||||||
|
|
||||||
{% if matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix != '/' %}
|
{% if matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix != '/' %}
|
||||||
traefik.http.middlewares.matrix-appservice-irc-media-proxy-slashless-redirect.redirectregex.regex=({{ matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix | quote }})$
|
traefik.http.middlewares.matrix-appservice-irc-media-proxy-slashless-redirect.redirectregex.regex=({{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix | quote }})$
|
||||||
traefik.http.middlewares.matrix-appservice-irc-media-proxy-slashless-redirect.redirectregex.replacement=${1}/
|
traefik.http.middlewares.matrix-appservice-irc-media-proxy-slashless-redirect.redirectregex.replacement=${1}/
|
||||||
{% set middlewares = middlewares + ['matrix-appservice-irc-media-proxy-slashless-redirect'] %}
|
{% set middlewares = middlewares + ['matrix-appservice-irc-media-proxy-slashless-redirect'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix != '/' %}
|
{% if matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix != '/' %}
|
||||||
traefik.http.middlewares.matrix-appservice-irc-media-proxy-strip-prefix.stripprefix.prefixes={{ matrix_appservice_irc_container_labels_media_proxy_traefik_path_prefix }}
|
traefik.http.middlewares.matrix-appservice-irc-media-proxy-strip-prefix.stripprefix.prefixes={{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_path_prefix }}
|
||||||
{% set middlewares = middlewares + ['matrix-appservice-irc-media-proxy-strip-prefix'] %}
|
{% set middlewares = middlewares + ['matrix-appservice-irc-media-proxy-strip-prefix'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if matrix_appservice_irc_container_labels_media_proxy_traefik_priority | int > 0 %}
|
{% if matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_priority | int > 0 %}
|
||||||
traefik.http.routers.matrix-appservice-irc-media-proxy.priority={{ matrix_appservice_irc_container_labels_media_proxy_traefik_priority }}
|
traefik.http.routers.matrix-appservice-irc-media-proxy.priority={{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_priority }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
traefik.http.routers.matrix-appservice-irc-media-proxy.service=matrix-appservice-irc-media-proxy
|
traefik.http.routers.matrix-appservice-irc-media-proxy.service=matrix-appservice-irc-media-proxy
|
||||||
traefik.http.routers.matrix-appservice-irc-media-proxy.entrypoints={{ matrix_appservice_irc_container_labels_media_proxy_traefik_entrypoints }}
|
traefik.http.routers.matrix-appservice-irc-media-proxy.entrypoints={{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_entrypoints }}
|
||||||
|
|
||||||
{% if middlewares | length > 0 %}
|
{% if middlewares | length > 0 %}
|
||||||
traefik.http.routers.matrix-appservice-irc-media-proxy.middlewares={{ middlewares | join(',') }}
|
traefik.http.routers.matrix-appservice-irc-media-proxy.middlewares={{ middlewares | join(',') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
traefik.http.routers.matrix-appservice-irc-media-proxy.tls={{ matrix_appservice_irc_container_labels_media_proxy_traefik_tls | to_json }}
|
traefik.http.routers.matrix-appservice-irc-media-proxy.tls={{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_tls | to_json }}
|
||||||
{% if matrix_appservice_irc_container_labels_media_proxy_traefik_tls %}
|
{% if matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_tls %}
|
||||||
traefik.http.routers.matrix-appservice-irc-media-proxy.tls.certResolver={{ matrix_appservice_irc_container_labels_media_proxy_traefik_tls_certResolver }}
|
traefik.http.routers.matrix-appservice-irc-media-proxy.tls.certResolver={{ matrix_bridge_appservice_irc_container_labels_media_proxy_traefik_tls_certResolver }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
@@ -60,4 +60,4 @@ traefik.http.routers.matrix-appservice-irc-media-proxy.tls.certResolver={{ matri
|
|||||||
############################################################
|
############################################################
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ matrix_appservice_irc_container_labels_additional_labels }}
|
{{ matrix_bridge_appservice_irc_container_labels_additional_labels }}
|
||||||
|
|||||||
+14
-14
@@ -1,11 +1,11 @@
|
|||||||
#jinja2: lstrip_blocks: True
|
#jinja2: lstrip_blocks: True
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Matrix Appservice IRC bridge
|
Description=Matrix Appservice IRC bridge
|
||||||
{% for service in matrix_appservice_irc_systemd_required_services_list %}
|
{% for service in matrix_bridge_appservice_irc_systemd_required_services_list %}
|
||||||
Requires={{ service }}
|
Requires={{ service }}
|
||||||
After={{ service }}
|
After={{ service }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for service in matrix_appservice_irc_systemd_wanted_services_list %}
|
{% for service in matrix_bridge_appservice_irc_systemd_wanted_services_list %}
|
||||||
Wants={{ service }}
|
Wants={{ service }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
@@ -22,25 +22,25 @@ 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_appservice_irc_container_network }} \
|
--network={{ matrix_bridge_appservice_irc_container_network }} \
|
||||||
{% if matrix_appservice_irc_container_http_host_bind_port %}
|
{% if matrix_bridge_appservice_irc_container_http_host_bind_port %}
|
||||||
-p {{ matrix_appservice_irc_container_http_host_bind_port }}:9999 \
|
-p {{ matrix_bridge_appservice_irc_container_http_host_bind_port }}:9999 \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if matrix_appservice_irc_container_media_proxy_host_bind_port %}
|
{% if matrix_bridge_appservice_irc_container_media_proxy_host_bind_port %}
|
||||||
-p {{ matrix_appservice_irc_container_media_proxy_host_bind_port }}:{{ matrix_appservice_irc_ircService_mediaProxy_bindPort }} \
|
-p {{ matrix_bridge_appservice_irc_container_media_proxy_host_bind_port }}:{{ matrix_bridge_appservice_irc_ircService_mediaProxy_bindPort }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
--mount type=bind,src={{ matrix_appservice_irc_config_path }},dst=/config \
|
--mount type=bind,src={{ matrix_bridge_appservice_irc_config_path }},dst=/config \
|
||||||
--mount type=bind,src={{ matrix_appservice_irc_data_path }},dst=/data \
|
--mount type=bind,src={{ matrix_bridge_appservice_irc_data_path }},dst=/data \
|
||||||
--label-file={{ matrix_appservice_irc_base_path }}/labels \
|
--label-file={{ matrix_bridge_appservice_irc_base_path }}/labels \
|
||||||
{% for arg in matrix_appservice_irc_container_extra_arguments %}
|
{% for arg in matrix_bridge_appservice_irc_container_extra_arguments %}
|
||||||
{{ arg }} \
|
{{ arg }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
--entrypoint=/bin/bash \
|
--entrypoint=/bin/bash \
|
||||||
{{ matrix_appservice_irc_container_image }} \
|
{{ matrix_bridge_appservice_irc_container_image }} \
|
||||||
-c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999'
|
-c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999'
|
||||||
|
|
||||||
{% if matrix_appservice_irc_container_network != 'host' %}
|
{% if matrix_bridge_appservice_irc_container_network != 'host' %}
|
||||||
{% for network in matrix_appservice_irc_container_additional_networks %}
|
{% for network in matrix_bridge_appservice_irc_container_additional_networks %}
|
||||||
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-appservice-irc
|
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-appservice-irc
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user