diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 221662c5..a7290f9d 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -22,16 +22,16 @@ matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matri matrix_homeserver_container_url: |- {{ 'http://matrix-nginx-proxy:12080' if matrix_nginx_proxy_enabled else { - 'synapse': ('http://matrix-synapse:'+ matrix_synapse_container_client_api_port|string), - 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string), + 'synapse': ('http://matrix-synapse:'+ matrix_synapse_container_client_api_port | string), + 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port | string), }[matrix_homeserver_implementation] }} matrix_homeserver_container_federation_url: |- {{ 'http://matrix-nginx-proxy:12088' if matrix_nginx_proxy_enabled else { - 'synapse': ('http://matrix-synapse:'+ matrix_synapse_container_federation_api_plain_port|string), - 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string), + 'synapse': ('http://matrix-synapse:'+ matrix_synapse_container_federation_api_plain_port | string), + 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port | string), }[matrix_homeserver_implementation] }} @@ -1158,7 +1158,7 @@ matrix_backup_borg_postgresql_databases: | 'name': matrix_synapse_database_database }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else []) + - matrix_postgres_additional_databases)|map(attribute='name')|list + matrix_postgres_additional_databases)|map(attribute='name') | list }} matrix_backup_borg_location_source_directories: - "{{ matrix_base_data_path }}" @@ -1431,7 +1431,7 @@ matrix_ma1sd_container_image_self_build: "{{ matrix_architecture != 'amd64' }}" # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose # ma1sd's web-server port. -matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_ma1sd_container_port|string }}" +matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_ma1sd_container_port | string }}" # We enable Synapse integration via its Postgres database by default. @@ -1540,14 +1540,14 @@ matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:1 matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}" matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container: "matrix-synapse:{{ matrix_synapse_container_client_api_port }}" matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container: "127.0.0.1:{{ matrix_synapse_container_client_api_port }}" -matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container: "matrix-synapse:{{matrix_synapse_container_federation_api_plain_port|string}}" -matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container: "127.0.0.1:{{matrix_synapse_container_federation_api_plain_port|string}}" +matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container: "matrix-synapse:{{matrix_synapse_container_federation_api_plain_port | string}}" +matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container: "127.0.0.1:{{matrix_synapse_container_federation_api_plain_port | string}}" matrix_nginx_proxy_proxy_dendrite_enabled: "{{ matrix_dendrite_enabled }}" -matrix_nginx_proxy_proxy_dendrite_client_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port|string }}" -matrix_nginx_proxy_proxy_dendrite_client_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port|string }}" -matrix_nginx_proxy_proxy_dendrite_federation_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port|string }}" -matrix_nginx_proxy_proxy_dendrite_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port|string }}" +matrix_nginx_proxy_proxy_dendrite_client_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}" +matrix_nginx_proxy_proxy_dendrite_client_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}" +matrix_nginx_proxy_proxy_dendrite_federation_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}" +matrix_nginx_proxy_proxy_dendrite_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}" # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}" @@ -1885,14 +1885,14 @@ matrix_postgres_import_roles_to_ignore: | {{ [matrix_postgres_connection_username] + - matrix_postgres_additional_databases|map(attribute='username')|list + matrix_postgres_additional_databases|map(attribute='username') | list }} matrix_postgres_import_databases_to_ignore: | {{ [matrix_postgres_db_name] + - matrix_postgres_additional_databases|map(attribute='name')|list + matrix_postgres_additional_databases|map(attribute='name') | list }} ###################################################################### @@ -2058,18 +2058,18 @@ matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm6 # When ma1sd is enabled, we can use it to validate email addresses and phone numbers. # Synapse can validate email addresses by itself as well, but it's probably not what we want by default when we have an identity server. -matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port|string if matrix_ma1sd_enabled else '' }}" -matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port|string if matrix_ma1sd_enabled else '' }}" +matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port | string if matrix_ma1sd_enabled else '' }}" +matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port | string if matrix_ma1sd_enabled else '' }}" # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, # you can expose Synapse's ports to the host. # # For exposing the Matrix Client API's port (plain HTTP) to the local host. -matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_synapse_container_client_api_port|string }}" +matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_synapse_container_client_api_port | string }}" # # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host. -matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_synapse_container_federation_api_plain_port|string }}" +matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_synapse_container_federation_api_plain_port | string }}" # # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces. matrix_synapse_container_federation_api_tls_host_bind_port: "{{ matrix_federation_public_port if (matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled) else '' }}" @@ -2213,10 +2213,10 @@ matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enab matrix_prometheus_scraper_node_targets: "{{ ['matrix-prometheus-node-exporter:9100'] if matrix_prometheus_node_exporter_enabled else [] }}" matrix_prometheus_scraper_postgres_enabled: "{{ matrix_prometheus_postgres_exporter_enabled }}" -matrix_prometheus_scraper_postgres_targets: "{{ ['matrix-prometheus-postgres-exporter:'+ matrix_prometheus_postgres_exporter_port|string] if matrix_prometheus_scraper_postgres_enabled else [] }}" +matrix_prometheus_scraper_postgres_targets: "{{ ['matrix-prometheus-postgres-exporter:'+ matrix_prometheus_postgres_exporter_port | string] if matrix_prometheus_scraper_postgres_enabled else [] }}" matrix_prometheus_scraper_hookshot_enabled: "{{ matrix_hookshot_metrics_enabled|default(false) }}" -matrix_prometheus_scraper_hookshot_targets: "{{ [matrix_hookshot_container_url|string +':'+ matrix_hookshot_metrics_port|string] if matrix_hookshot_metrics_enabled else [] }}" +matrix_prometheus_scraper_hookshot_targets: "{{ [matrix_hookshot_container_url | string +':'+ matrix_hookshot_metrics_port | string] if matrix_hookshot_metrics_enabled else [] }}" ###################################################################### # @@ -2345,7 +2345,7 @@ matrix_postgres_backup_databases: | 'name': matrix_synapse_database_database }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else []) + - matrix_postgres_additional_databases)|map(attribute='name')|list + matrix_postgres_additional_databases)|map(attribute='name') | list }} ###################################################################### @@ -2367,10 +2367,10 @@ matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}" # you can expose Dendrite's ports to the host. # # For exposing Dendrite's plain HTTP server to the local host. -matrix_dendrite_container_http_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_dendrite_http_bind_port|string) }}" +matrix_dendrite_container_http_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_dendrite_http_bind_port | string) }}" # # For exposing Dendrite's HTTPS server to the local host. -matrix_dendrite_container_https_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled or not matrix_dendrite_https_bind_port else ('127.0.0.1:' + matrix_dendrite_https_bind_port|string) }}" +matrix_dendrite_container_https_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled or not matrix_dendrite_https_bind_port else ('127.0.0.1:' + matrix_dendrite_https_bind_port | string) }}" matrix_dendrite_sync_api_real_ip_header: "{{ 'X-Forwarded-For' if matrix_nginx_proxy_enabled else '' }}" diff --git a/roles/matrix-backup-borg/defaults/main.yml b/roles/matrix-backup-borg/defaults/main.yml index ed2ffb72..83a5ca44 100644 --- a/roles/matrix-backup-borg/defaults/main.yml +++ b/roles/matrix-backup-borg/defaults/main.yml @@ -97,4 +97,4 @@ matrix_backup_borg_configuration_extension: "{{ matrix_backup_borg_configuration # Holds the final borgmatic configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_backup_borg_configuration_yaml`. -matrix_backup_borg_configuration: "{{ matrix_backup_borg_configuration_yaml | from_yaml|combine(matrix_backup_borg_configuration_extension, recursive=True) }}" +matrix_backup_borg_configuration: "{{ matrix_backup_borg_configuration_yaml | from_yaml | combine(matrix_backup_borg_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-base/defaults/main.yml b/roles/matrix-base/defaults/main.yml index a0c0da9b..b3aa3a75 100644 --- a/roles/matrix-base/defaults/main.yml +++ b/roles/matrix-base/defaults/main.yml @@ -134,8 +134,8 @@ matrix_host_command_openssl: "/usr/bin/env openssl" matrix_host_command_systemctl: "/usr/bin/env systemctl" matrix_host_command_sh: "/usr/bin/env sh" -matrix_ntpd_package: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int > 18) else ( 'systemd' if ansible_os_family == 'Suse' else 'ntp' ) }}" -matrix_ntpd_service: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int > 18) or ansible_distribution == 'Archlinux' or ansible_os_family == 'Suse' else ('ntpd' if ansible_os_family == 'RedHat' else 'ntp') }}" +matrix_ntpd_package: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) else ( 'systemd' if ansible_os_family == 'Suse' else 'ntp' ) }}" +matrix_ntpd_service: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) or ansible_distribution == 'Archlinux' or ansible_os_family == 'Suse' else ('ntpd' if ansible_os_family == 'RedHat' else 'ntp') }}" matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}" @@ -202,11 +202,11 @@ matrix_well_known_matrix_client_configuration_default: "{{ lookup('template', 't # } matrix_well_known_matrix_client_configuration_extension_json: '{}' -matrix_well_known_matrix_client_configuration_extension: "{{ matrix_well_known_matrix_client_configuration_extension_json|from_json if matrix_well_known_matrix_client_configuration_extension_json|from_json is mapping else {} }}" +matrix_well_known_matrix_client_configuration_extension: "{{ matrix_well_known_matrix_client_configuration_extension_json | from_json if matrix_well_known_matrix_client_configuration_extension_json | from_json is mapping else {} }}" # Holds the final `/.well-known/matrix/client` configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_well_known_matrix_client_configuration_default` and `matrix_well_known_matrix_client_configuration_extension_json`. -matrix_well_known_matrix_client_configuration: "{{ matrix_well_known_matrix_client_configuration_default|combine(matrix_well_known_matrix_client_configuration_extension, recursive=True) }}" +matrix_well_known_matrix_client_configuration: "{{ matrix_well_known_matrix_client_configuration_default | combine(matrix_well_known_matrix_client_configuration_extension, recursive=True) }}" # Default `/.well-known/matrix/server` configuration - it covers the generic use case. # You can customize it by controlling the various variables inside the template file that it references. @@ -234,11 +234,11 @@ matrix_well_known_matrix_server_configuration_default: "{{ lookup('template', 't # } matrix_well_known_matrix_server_configuration_extension_json: '{}' -matrix_well_known_matrix_server_configuration_extension: "{{ matrix_well_known_matrix_server_configuration_extension_json|from_json if matrix_well_known_matrix_server_configuration_extension_json|from_json is mapping else {} }}" +matrix_well_known_matrix_server_configuration_extension: "{{ matrix_well_known_matrix_server_configuration_extension_json | from_json if matrix_well_known_matrix_server_configuration_extension_json | from_json is mapping else {} }}" # Holds the final `/.well-known/matrix/server` configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_well_known_matrix_server_configuration_default` and `matrix_well_known_matrix_server_configuration_extension_json`. -matrix_well_known_matrix_server_configuration: "{{ matrix_well_known_matrix_server_configuration_default|combine(matrix_well_known_matrix_server_configuration_extension, recursive=True) }}" +matrix_well_known_matrix_server_configuration: "{{ matrix_well_known_matrix_server_configuration_default | combine(matrix_well_known_matrix_server_configuration_extension, recursive=True) }}" # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict. # This is unlike what it does when looking up YAML template files (no automatic parsing there). diff --git a/roles/matrix-base/tasks/sanity_check.yml b/roles/matrix-base/tasks/sanity_check.yml index 03ff0afb..76100687 100644 --- a/roles/matrix-base/tasks/sanity_check.yml +++ b/roles/matrix-base/tasks/sanity_check.yml @@ -64,7 +64,7 @@ - "{{ matrix_domain }}" - "{{ matrix_server_fqn_matrix }}" - "{{ matrix_server_fqn_element }}" - when: "item != item|lower" + when: "item != item | lower" - name: Fail if using python2 on Archlinux ansible.builtin.fail: diff --git a/roles/matrix-base/tasks/server_base/setup.yml b/roles/matrix-base/tasks/server_base/setup.yml index cec74590..40d5a4d0 100644 --- a/roles/matrix-base/tasks/server_base/setup.yml +++ b/roles/matrix-base/tasks/server_base/setup.yml @@ -1,13 +1,13 @@ --- - ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat.yml" - when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int < 8 + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int < 8 - ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat8.yml" - when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 7 and ansible_distribution_major_version|int < 30 + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7 and ansible_distribution_major_version | int < 30 - ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_fedora.yml" - when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int > 30 + when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 30 - block: # ansible_lsb is only available if lsb-release is installed. @@ -20,7 +20,7 @@ register: lsb_release_installation_result - name: Reread ansible_lsb facts if lsb-release got installed - setup: filter=ansible_lsb* + ansible.builtin.setup: filter=ansible_lsb* when: lsb_release_installation_result.changed - ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_debian.yml" diff --git a/roles/matrix-base/tasks/server_base/setup_debian.yml b/roles/matrix-base/tasks/server_base/setup_debian.yml index c463738b..d6ef5cd9 100644 --- a/roles/matrix-base/tasks/server_base/setup_debian.yml +++ b/roles/matrix-base/tasks/server_base/setup_debian.yml @@ -10,8 +10,8 @@ update_cache: true - name: Ensure Docker's APT key is trusted - apt_key: - url: "https://download.docker.com/linux/{{ ansible_distribution|lower }}/gpg" + ansible.builtin.apt_key: + url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg" id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 state: present register: add_repository_key @@ -19,8 +19,8 @@ when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' - name: Ensure Docker repository is enabled - apt_repository: - repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable" + ansible.builtin.apt_repository: + repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable" state: present update_cache: true when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' @@ -36,6 +36,6 @@ ansible.builtin.apt: name: - "{{ matrix_docker_package_name }}" - - "python{{'3' if ansible_python.version.major == 3 else ''}}-docker" + - "python{{ '3' if ansible_python.version.major == 3 else '' }}-docker" state: latest when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/server_base/setup_fedora.yml b/roles/matrix-base/tasks/server_base/setup_fedora.yml index e9ddf54b..b5646c8f 100644 --- a/roles/matrix-base/tasks/server_base/setup_fedora.yml +++ b/roles/matrix-base/tasks/server_base/setup_fedora.yml @@ -12,7 +12,7 @@ when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' - name: Ensure Docker's RPM key is trusted - rpm_key: + ansible.builtin.rpm_key: state: present key: https://download.docker.com/linux/fedora/gpg when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' @@ -33,7 +33,7 @@ when: matrix_docker_installation_enabled | bool - name: Ensure Docker-Py is installed - pip: + ansible.builtin.pip: name: docker-py state: latest when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-base/tasks/server_base/setup_raspbian.yml b/roles/matrix-base/tasks/server_base/setup_raspbian.yml index 6f0b1467..b5eb4016 100644 --- a/roles/matrix-base/tasks/server_base/setup_raspbian.yml +++ b/roles/matrix-base/tasks/server_base/setup_raspbian.yml @@ -10,7 +10,7 @@ update_cache: true - name: Ensure Docker's APT key is trusted - apt_key: + ansible.builtin.apt_key: url: https://download.docker.com/linux/raspbian/gpg id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 state: present @@ -19,7 +19,7 @@ when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' - name: Ensure Docker repository is enabled - apt_repository: + ansible.builtin.apt_repository: repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable" state: present update_cache: true diff --git a/roles/matrix-base/tasks/server_base/setup_redhat.yml b/roles/matrix-base/tasks/server_base/setup_redhat.yml index 92615ac7..189fcecd 100644 --- a/roles/matrix-base/tasks/server_base/setup_redhat.yml +++ b/roles/matrix-base/tasks/server_base/setup_redhat.yml @@ -10,7 +10,7 @@ when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' - name: Ensure Docker's RPM key is trusted - rpm_key: + ansible.builtin.rpm_key: state: present key: https://download.docker.com/linux/centos/gpg when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' diff --git a/roles/matrix-base/tasks/server_base/setup_redhat8.yml b/roles/matrix-base/tasks/server_base/setup_redhat8.yml index 7b50160d..9e1aaa01 100644 --- a/roles/matrix-base/tasks/server_base/setup_redhat8.yml +++ b/roles/matrix-base/tasks/server_base/setup_redhat8.yml @@ -10,7 +10,7 @@ when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' - name: Ensure Docker's RPM key is trusted - rpm_key: + ansible.builtin.rpm_key: state: present key: https://download.docker.com/linux/centos/gpg when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' @@ -38,7 +38,7 @@ when: matrix_docker_installation_enabled | bool - name: Ensure Docker-Py is installed - pip: + ansible.builtin.pip: name: docker-py state: latest when: matrix_docker_installation_enabled | bool diff --git a/roles/matrix-bot-go-neb/defaults/main.yml b/roles/matrix-bot-go-neb/defaults/main.yml index f01f28fc..61c5d54d 100644 --- a/roles/matrix-bot-go-neb/defaults/main.yml +++ b/roles/matrix-bot-go-neb/defaults/main.yml @@ -228,4 +228,4 @@ matrix_bot_go_neb_configuration_extension: "{{ matrix_bot_go_neb_configuration_e # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_bot_go_neb_configuration_yaml`. -matrix_bot_go_neb_configuration: "{{ matrix_bot_go_neb_configuration_yaml | from_yaml|combine(matrix_bot_go_neb_configuration_extension, recursive=True) }}" +matrix_bot_go_neb_configuration: "{{ matrix_bot_go_neb_configuration_yaml | from_yaml | combine(matrix_bot_go_neb_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml b/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml index 8a63413e..9eebed0a 100644 --- a/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml +++ b/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml @@ -97,4 +97,4 @@ matrix_bot_matrix_reminder_bot_configuration_extension: "{{ matrix_bot_matrix_re # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_bot_matrix_reminder_bot_configuration_yaml`. -matrix_bot_matrix_reminder_bot_configuration: "{{ matrix_bot_matrix_reminder_bot_configuration_yaml | from_yaml|combine(matrix_bot_matrix_reminder_bot_configuration_extension, recursive=True) }}" +matrix_bot_matrix_reminder_bot_configuration: "{{ matrix_bot_matrix_reminder_bot_configuration_yaml | from_yaml | combine(matrix_bot_matrix_reminder_bot_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-bot-mjolnir/defaults/main.yml b/roles/matrix-bot-mjolnir/defaults/main.yml index e03dff40..0be97eae 100644 --- a/roles/matrix-bot-mjolnir/defaults/main.yml +++ b/roles/matrix-bot-mjolnir/defaults/main.yml @@ -56,4 +56,4 @@ matrix_bot_mjolnir_configuration_extension: "{{ matrix_bot_mjolnir_configuration # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_bot_mjolnir_configuration_yaml`. -matrix_bot_mjolnir_configuration: "{{ matrix_bot_mjolnir_configuration_yaml | from_yaml|combine(matrix_bot_mjolnir_configuration_extension, recursive=True) }}" +matrix_bot_mjolnir_configuration: "{{ matrix_bot_mjolnir_configuration_yaml | from_yaml | combine(matrix_bot_mjolnir_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-bridge-appservice-discord/defaults/main.yml b/roles/matrix-bridge-appservice-discord/defaults/main.yml index 0d0d35fb..683d7ecb 100644 --- a/roles/matrix-bridge-appservice-discord/defaults/main.yml +++ b/roles/matrix-bridge-appservice-discord/defaults/main.yml @@ -89,7 +89,7 @@ matrix_appservice_discord_configuration_extension_yaml: | matrix_appservice_discord_configuration_extension: "{{ matrix_appservice_discord_configuration_extension_yaml | from_yaml if matrix_appservice_discord_configuration_extension_yaml | from_yaml is mapping else {} }}" -matrix_appservice_discord_configuration: "{{ matrix_appservice_discord_configuration_yaml | from_yaml|combine(matrix_appservice_discord_configuration_extension, recursive=True) }}" +matrix_appservice_discord_configuration: "{{ matrix_appservice_discord_configuration_yaml | from_yaml | combine(matrix_appservice_discord_configuration_extension, recursive=True) }}" matrix_appservice_discord_registration_yaml: | #jinja2: lstrip_blocks: "True" @@ -99,10 +99,10 @@ matrix_appservice_discord_registration_yaml: | namespaces: users: - exclusive: true - regex: '@_discord_.*:{{ matrix_appservice_discord_homeserver_domain|regex_escape }}' + regex: '@_discord_.*:{{ matrix_appservice_discord_homeserver_domain | regex_escape }}' aliases: - exclusive: true - regex: '#_discord_.*:{{ matrix_appservice_discord_homeserver_domain|regex_escape }}' + regex: '#_discord_.*:{{ matrix_appservice_discord_homeserver_domain | regex_escape }}' url: {{ matrix_appservice_discord_appservice_url }} sender_localpart: _discord_bot rate_limited: false diff --git a/roles/matrix-bridge-appservice-discord/templates/config.yaml.j2 b/roles/matrix-bridge-appservice-discord/templates/config.yaml.j2 index 569a3030..a530af2e 100644 --- a/roles/matrix-bridge-appservice-discord/templates/config.yaml.j2 +++ b/roles/matrix-bridge-appservice-discord/templates/config.yaml.j2 @@ -34,7 +34,7 @@ bridge: determineCodeLanguage: false # Authentication configuration for the discord bot. auth: - clientID: {{ matrix_appservice_discord_client_id|string|to_json }} + clientID: {{ matrix_appservice_discord_client_id | string|to_json }} botToken: {{ matrix_appservice_discord_bot_token|to_json }} # You must enable "Privileged Gateway Intents" in your bot settings on discord.com (e.g. https://discord.com/developers/applications/12345/bot) # for this to work diff --git a/roles/matrix-bridge-appservice-irc/defaults/main.yml b/roles/matrix-bridge-appservice-irc/defaults/main.yml index 19dd9e59..268a05dc 100644 --- a/roles/matrix-bridge-appservice-irc/defaults/main.yml +++ b/roles/matrix-bridge-appservice-irc/defaults/main.yml @@ -384,7 +384,7 @@ matrix_appservice_irc_configuration_extension_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_appservice_irc_configuration: "{{ matrix_appservice_irc_configuration_yaml | from_yaml|combine(matrix_appservice_irc_configuration_extension, recursive=True) }}" +matrix_appservice_irc_configuration: "{{ matrix_appservice_irc_configuration_yaml | from_yaml | combine(matrix_appservice_irc_configuration_extension, recursive=True) }}" # 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. diff --git a/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml b/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml index b04b1ade..c3bdd639 100644 --- a/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml +++ b/roles/matrix-bridge-appservice-irc/tasks/setup_install.yml @@ -173,7 +173,7 @@ - name: Combine registration-template.yaml and own registration override config ansible.builtin.set_fact: - matrix_appservice_irc_registration: "{{ matrix_appservice_irc_registration_template|combine(matrix_appservice_irc_registration_override, recursive=True) }}" + matrix_appservice_irc_registration: "{{ matrix_appservice_irc_registration_template | combine(matrix_appservice_irc_registration_override, recursive=True) }}" - name: Ensure Appservice IRC registration.yaml installed ansible.builtin.copy: diff --git a/roles/matrix-bridge-appservice-slack/defaults/main.yml b/roles/matrix-bridge-appservice-slack/defaults/main.yml index 8f88c308..bbbbec99 100644 --- a/roles/matrix-bridge-appservice-slack/defaults/main.yml +++ b/roles/matrix-bridge-appservice-slack/defaults/main.yml @@ -97,7 +97,7 @@ matrix_appservice_slack_configuration_extension_yaml: | matrix_appservice_slack_configuration_extension: "{{ matrix_appservice_slack_configuration_extension_yaml | from_yaml if matrix_appservice_slack_configuration_extension_yaml | from_yaml else {} }}" -matrix_appservice_slack_configuration: "{{ matrix_appservice_slack_configuration_yaml | from_yaml|combine(matrix_appservice_slack_configuration_extension, recursive=True) }}" +matrix_appservice_slack_configuration: "{{ matrix_appservice_slack_configuration_yaml | from_yaml | combine(matrix_appservice_slack_configuration_extension, recursive=True) }}" matrix_appservice_slack_registration_yaml: | id: "{{ matrix_appservice_slack_id_token }}" diff --git a/roles/matrix-bridge-appservice-webhooks/defaults/main.yml b/roles/matrix-bridge-appservice-webhooks/defaults/main.yml index 0824dc1c..f181f095 100644 --- a/roles/matrix-bridge-appservice-webhooks/defaults/main.yml +++ b/roles/matrix-bridge-appservice-webhooks/defaults/main.yml @@ -63,7 +63,7 @@ matrix_appservice_webhooks_configuration_extension_yaml: | matrix_appservice_webhooks_configuration_extension: "{{ matrix_appservice_webhooks_configuration_extension_yaml | from_yaml if matrix_appservice_webhooks_configuration_extension_yaml | from_yaml else {} }}" -matrix_appservice_webhooks_configuration: "{{ matrix_appservice_webhooks_configuration_yaml | from_yaml|combine(matrix_appservice_webhooks_configuration_extension, recursive=True) }}" +matrix_appservice_webhooks_configuration: "{{ matrix_appservice_webhooks_configuration_yaml | from_yaml | combine(matrix_appservice_webhooks_configuration_extension, recursive=True) }}" matrix_appservice_webhooks_registration_yaml: | id: "{{ matrix_appservice_webhooks_id_token }}" diff --git a/roles/matrix-bridge-beeper-linkedin/defaults/main.yml b/roles/matrix-bridge-beeper-linkedin/defaults/main.yml index 18ca90e9..a8338093 100644 --- a/roles/matrix-bridge-beeper-linkedin/defaults/main.yml +++ b/roles/matrix-bridge-beeper-linkedin/defaults/main.yml @@ -92,7 +92,7 @@ matrix_beeper_linkedin_configuration_extension: "{{ matrix_beeper_linkedin_confi # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_beeper_linkedin_configuration_yaml`. -matrix_beeper_linkedin_configuration: "{{ matrix_beeper_linkedin_configuration_yaml | from_yaml|combine(matrix_beeper_linkedin_configuration_extension, recursive=True) }}" +matrix_beeper_linkedin_configuration: "{{ matrix_beeper_linkedin_configuration_yaml | from_yaml | combine(matrix_beeper_linkedin_configuration_extension, recursive=True) }}" matrix_beeper_linkedin_registration_yaml: | id: linkedin @@ -104,10 +104,10 @@ matrix_beeper_linkedin_registration_yaml: | rate_limited: false namespaces: users: - - regex: '^@linkedin_.+:{{ matrix_beeper_linkedin_homeserver_domain|regex_escape }}$' + - regex: '^@linkedin_.+:{{ matrix_beeper_linkedin_homeserver_domain | regex_escape }}$' exclusive: true - exclusive: true - regex: '^@{{ matrix_beeper_linkedin_appservice_bot_username|regex_escape }}:{{ matrix_beeper_linkedin_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_beeper_linkedin_appservice_bot_username | regex_escape }}:{{ matrix_beeper_linkedin_homeserver_domain | regex_escape }}$' de.sorunome.msc2409.push_ephemeral: true matrix_beeper_linkedin_registration: "{{ matrix_beeper_linkedin_registration_yaml | from_yaml }}" diff --git a/roles/matrix-bridge-go-skype-bridge/defaults/main.yml b/roles/matrix-bridge-go-skype-bridge/defaults/main.yml index dd08fc40..b05e78a5 100644 --- a/roles/matrix-bridge-go-skype-bridge/defaults/main.yml +++ b/roles/matrix-bridge-go-skype-bridge/defaults/main.yml @@ -105,7 +105,7 @@ matrix_go_skype_bridge_configuration_extension: "{{ matrix_go_skype_bridge_confi # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_go_skype_bridge_configuration_yaml`. -matrix_go_skype_bridge_configuration: "{{ matrix_go_skype_bridge_configuration_yaml | from_yaml|combine(matrix_go_skype_bridge_configuration_extension, recursive=True) }}" +matrix_go_skype_bridge_configuration: "{{ matrix_go_skype_bridge_configuration_yaml | from_yaml | combine(matrix_go_skype_bridge_configuration_extension, recursive=True) }}" matrix_go_skype_bridge_registration_yaml: | id: skype @@ -117,10 +117,10 @@ matrix_go_skype_bridge_registration_yaml: | rate_limited: false namespaces: users: - - regex: '^@skype-(.*):{{ matrix_go_skype_bridge_homeserver_domain|regex_escape }}$' + - regex: '^@skype-(.*):{{ matrix_go_skype_bridge_homeserver_domain | regex_escape }}$' exclusive: true - exclusive: true - regex: '^@{{ matrix_go_skype_bridge_appservice_bot_username|regex_escape }}:{{ matrix_go_skype_bridge_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_go_skype_bridge_appservice_bot_username | regex_escape }}:{{ matrix_go_skype_bridge_homeserver_domain | regex_escape }}$' de.sorunome.msc2409.push_ephemeral: true matrix_go_skype_bridge_registration: "{{ matrix_go_skype_bridge_registration_yaml | from_yaml }}" diff --git a/roles/matrix-bridge-hookshot/defaults/main.yml b/roles/matrix-bridge-hookshot/defaults/main.yml index ed99ef6d..6ca33b8a 100644 --- a/roles/matrix-bridge-hookshot/defaults/main.yml +++ b/roles/matrix-bridge-hookshot/defaults/main.yml @@ -237,7 +237,7 @@ matrix_hookshot_configuration_extension: "{{ matrix_hookshot_configuration_exten # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_hookshot_configuration_yaml`. -matrix_hookshot_configuration: "{{ matrix_hookshot_configuration_yaml | from_yaml|combine(matrix_hookshot_configuration_extension, recursive=True) }}" +matrix_hookshot_configuration: "{{ matrix_hookshot_configuration_yaml | from_yaml | combine(matrix_hookshot_configuration_extension, recursive=True) }}" # Default registration template which covers the generic use case. # You can customize it by controlling the various variables inside it. @@ -259,4 +259,4 @@ matrix_hookshot_registration_extension: "{{ matrix_hookshot_registration_extensi # Holds the final registration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_hookshot_registration_yaml`. -matrix_hookshot_registration: "{{ matrix_hookshot_registration_yaml | from_yaml|combine(matrix_hookshot_registration_extension, recursive=True) }}" +matrix_hookshot_registration: "{{ matrix_hookshot_registration_yaml | from_yaml | combine(matrix_hookshot_registration_extension, recursive=True) }}" diff --git a/roles/matrix-bridge-mautrix-facebook/defaults/main.yml b/roles/matrix-bridge-mautrix-facebook/defaults/main.yml index 0deb244d..51b4f357 100644 --- a/roles/matrix-bridge-mautrix-facebook/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-facebook/defaults/main.yml @@ -114,7 +114,7 @@ matrix_mautrix_facebook_configuration_extension: "{{ matrix_mautrix_facebook_con # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_facebook_configuration_yaml`. -matrix_mautrix_facebook_configuration: "{{ matrix_mautrix_facebook_configuration_yaml | from_yaml|combine(matrix_mautrix_facebook_configuration_extension, recursive=True) }}" +matrix_mautrix_facebook_configuration: "{{ matrix_mautrix_facebook_configuration_yaml | from_yaml | combine(matrix_mautrix_facebook_configuration_extension, recursive=True) }}" matrix_mautrix_facebook_registration_yaml: | id: facebook @@ -123,9 +123,9 @@ matrix_mautrix_facebook_registration_yaml: | namespaces: users: - exclusive: true - regex: '^@facebook_.+:{{ matrix_mautrix_facebook_homeserver_domain|regex_escape }}$' + regex: '^@facebook_.+:{{ matrix_mautrix_facebook_homeserver_domain | regex_escape }}$' - exclusive: true - regex: '^@{{ matrix_mautrix_facebook_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_facebook_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_facebook_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_facebook_homeserver_domain | regex_escape }}$' url: {{ matrix_mautrix_facebook_appservice_address }} # See https://github.com/mautrix/signal/issues/43 sender_localpart: _bot_{{ matrix_mautrix_facebook_appservice_bot_username }} diff --git a/roles/matrix-bridge-mautrix-googlechat/defaults/main.yml b/roles/matrix-bridge-mautrix-googlechat/defaults/main.yml index ebac567e..956d7174 100644 --- a/roles/matrix-bridge-mautrix-googlechat/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-googlechat/defaults/main.yml @@ -103,7 +103,7 @@ matrix_mautrix_googlechat_configuration_extension: "{{ matrix_mautrix_googlechat # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_googlechat_configuration_yaml`. -matrix_mautrix_googlechat_configuration: "{{ matrix_mautrix_googlechat_configuration_yaml | from_yaml|combine(matrix_mautrix_googlechat_configuration_extension, recursive=True) }}" +matrix_mautrix_googlechat_configuration: "{{ matrix_mautrix_googlechat_configuration_yaml | from_yaml | combine(matrix_mautrix_googlechat_configuration_extension, recursive=True) }}" matrix_mautrix_googlechat_registration_yaml: | id: googlechat @@ -112,9 +112,9 @@ matrix_mautrix_googlechat_registration_yaml: | namespaces: users: - exclusive: true - regex: '^@googlechat_.+:{{ matrix_mautrix_googlechat_homeserver_domain|regex_escape }}$' + regex: '^@googlechat_.+:{{ matrix_mautrix_googlechat_homeserver_domain | regex_escape }}$' - exclusive: true - regex: '^@{{ matrix_mautrix_googlechat_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_googlechat_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_googlechat_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_googlechat_homeserver_domain | regex_escape }}$' url: {{ matrix_mautrix_googlechat_appservice_address }} # See https://github.com/mautrix/signal/issues/43 sender_localpart: _bot_{{ matrix_mautrix_googlechat_appservice_bot_username }} diff --git a/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml b/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml index 77db85fe..aaa9b305 100644 --- a/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-hangouts/defaults/main.yml @@ -100,7 +100,7 @@ matrix_mautrix_hangouts_configuration_extension: "{{ matrix_mautrix_hangouts_con # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_hangouts_configuration_yaml`. -matrix_mautrix_hangouts_configuration: "{{ matrix_mautrix_hangouts_configuration_yaml | from_yaml|combine(matrix_mautrix_hangouts_configuration_extension, recursive=True) }}" +matrix_mautrix_hangouts_configuration: "{{ matrix_mautrix_hangouts_configuration_yaml | from_yaml | combine(matrix_mautrix_hangouts_configuration_extension, recursive=True) }}" matrix_mautrix_hangouts_registration_yaml: | id: hangouts @@ -109,9 +109,9 @@ matrix_mautrix_hangouts_registration_yaml: | namespaces: users: - exclusive: true - regex: '^@hangouts_.+:{{ matrix_mautrix_hangouts_homeserver_domain|regex_escape }}$' + regex: '^@hangouts_.+:{{ matrix_mautrix_hangouts_homeserver_domain | regex_escape }}$' - exclusive: true - regex: '^@{{ matrix_mautrix_hangouts_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_hangouts_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_hangouts_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_hangouts_homeserver_domain | regex_escape }}$' url: {{ matrix_mautrix_hangouts_appservice_address }} # See https://github.com/mautrix/signal/issues/43 sender_localpart: _bot_{{ matrix_mautrix_hangouts_appservice_bot_username }} diff --git a/roles/matrix-bridge-mautrix-instagram/defaults/main.yml b/roles/matrix-bridge-mautrix-instagram/defaults/main.yml index 8452d6f3..88812397 100644 --- a/roles/matrix-bridge-mautrix-instagram/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-instagram/defaults/main.yml @@ -93,7 +93,7 @@ matrix_mautrix_instagram_configuration_extension: "{{ matrix_mautrix_instagram_c # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_instagram_configuration_yaml`. -matrix_mautrix_instagram_configuration: "{{ matrix_mautrix_instagram_configuration_yaml | from_yaml|combine(matrix_mautrix_instagram_configuration_extension, recursive=True) }}" +matrix_mautrix_instagram_configuration: "{{ matrix_mautrix_instagram_configuration_yaml | from_yaml | combine(matrix_mautrix_instagram_configuration_extension, recursive=True) }}" matrix_mautrix_instagram_registration_yaml: | id: instagram @@ -102,9 +102,9 @@ matrix_mautrix_instagram_registration_yaml: | namespaces: users: - exclusive: true - regex: '^@instagram_.+:{{ matrix_mautrix_instagram_homeserver_domain|regex_escape }}$' + regex: '^@instagram_.+:{{ matrix_mautrix_instagram_homeserver_domain | regex_escape }}$' - exclusive: true - regex: '^@{{ matrix_mautrix_instagram_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_instagram_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_instagram_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_instagram_homeserver_domain | regex_escape }}$' url: {{ matrix_mautrix_instagram_appservice_address }} # See https://github.com/mautrix/signal/issues/43 sender_localpart: _bot_{{ matrix_mautrix_instagram_appservice_bot_username }} diff --git a/roles/matrix-bridge-mautrix-signal/defaults/main.yml b/roles/matrix-bridge-mautrix-signal/defaults/main.yml index 429d8ea8..81ddb8cd 100644 --- a/roles/matrix-bridge-mautrix-signal/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-signal/defaults/main.yml @@ -128,7 +128,7 @@ matrix_mautrix_signal_configuration_extension: "{{ matrix_mautrix_signal_configu # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_signal_configuration_yaml`. -matrix_mautrix_signal_configuration: "{{ matrix_mautrix_signal_configuration_yaml | from_yaml|combine(matrix_mautrix_signal_configuration_extension, recursive=True) }}" +matrix_mautrix_signal_configuration: "{{ matrix_mautrix_signal_configuration_yaml | from_yaml | combine(matrix_mautrix_signal_configuration_extension, recursive=True) }}" matrix_mautrix_signal_registration_yaml: "{{ lookup('template', 'templates/registration.yaml.j2') }}" diff --git a/roles/matrix-bridge-mautrix-signal/templates/registration.yaml.j2 b/roles/matrix-bridge-mautrix-signal/templates/registration.yaml.j2 index 32e913a1..5d6da2c4 100644 --- a/roles/matrix-bridge-mautrix-signal/templates/registration.yaml.j2 +++ b/roles/matrix-bridge-mautrix-signal/templates/registration.yaml.j2 @@ -5,12 +5,12 @@ hs_token: "{{ matrix_mautrix_signal_homeserver_token }}" namespaces: users: - exclusive: true - regex: '^@signal_.+:{{ matrix_mautrix_signal_homeserver_domain|regex_escape }}$' + regex: '^@signal_.+:{{ matrix_mautrix_signal_homeserver_domain | regex_escape }}$' - exclusive: true - regex: '^@{{ matrix_mautrix_signal_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_signal_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_signal_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_signal_homeserver_domain | regex_escape }}$' aliases: - exclusive: true - regex: '^#signal_.+:{{ matrix_mautrix_signal_homeserver_domain|regex_escape }}$' + regex: '^#signal_.+:{{ matrix_mautrix_signal_homeserver_domain | regex_escape }}$' url: {{ matrix_mautrix_signal_appservice_address }} # See https://github.com/mautrix/signal/issues/43 sender_localpart: _bot_{{ matrix_mautrix_signal_appservice_bot_username }} diff --git a/roles/matrix-bridge-mautrix-telegram/defaults/main.yml b/roles/matrix-bridge-mautrix-telegram/defaults/main.yml index a76186ae..fd7bf685 100644 --- a/roles/matrix-bridge-mautrix-telegram/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-telegram/defaults/main.yml @@ -121,7 +121,7 @@ matrix_mautrix_telegram_configuration_extension: "{{ matrix_mautrix_telegram_con # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_telegram_configuration_yaml`. -matrix_mautrix_telegram_configuration: "{{ matrix_mautrix_telegram_configuration_yaml | from_yaml|combine(matrix_mautrix_telegram_configuration_extension, recursive=True) }}" +matrix_mautrix_telegram_configuration: "{{ matrix_mautrix_telegram_configuration_yaml | from_yaml | combine(matrix_mautrix_telegram_configuration_extension, recursive=True) }}" matrix_mautrix_telegram_registration_yaml: | id: telegram @@ -130,12 +130,12 @@ matrix_mautrix_telegram_registration_yaml: | namespaces: users: - exclusive: true - regex: '^@telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$' + regex: '^@telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$' - exclusive: true - regex: '^@{{ matrix_mautrix_telegram_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_telegram_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$' aliases: - exclusive: true - regex: '^#telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain|regex_escape }}$' + regex: '^#telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$' # See https://github.com/mautrix/signal/issues/43 sender_localpart: _bot_{{ matrix_mautrix_telegram_appservice_bot_username }} url: {{ matrix_mautrix_telegram_appservice_address }} diff --git a/roles/matrix-bridge-mautrix-twitter/defaults/main.yml b/roles/matrix-bridge-mautrix-twitter/defaults/main.yml index 4943d715..8bf855dc 100644 --- a/roles/matrix-bridge-mautrix-twitter/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-twitter/defaults/main.yml @@ -91,7 +91,7 @@ matrix_mautrix_twitter_configuration_extension: "{{ matrix_mautrix_twitter_confi # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_twitter_configuration_yaml`. -matrix_mautrix_twitter_configuration: "{{ matrix_mautrix_twitter_configuration_yaml | from_yaml|combine(matrix_mautrix_twitter_configuration_extension, recursive=True) }}" +matrix_mautrix_twitter_configuration: "{{ matrix_mautrix_twitter_configuration_yaml | from_yaml | combine(matrix_mautrix_twitter_configuration_extension, recursive=True) }}" matrix_mautrix_twitter_registration_yaml: | id: twitter @@ -100,9 +100,9 @@ matrix_mautrix_twitter_registration_yaml: | namespaces: users: - exclusive: true - regex: '^@twitter_.+:{{ matrix_mautrix_twitter_homeserver_domain|regex_escape }}$' + regex: '^@twitter_.+:{{ matrix_mautrix_twitter_homeserver_domain | regex_escape }}$' - exclusive: true - regex: '^@{{ matrix_mautrix_twitter_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_twitter_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_twitter_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_twitter_homeserver_domain | regex_escape }}$' url: {{ matrix_mautrix_twitter_appservice_address }} # See https://github.com/tulir/mautrix-signal/issues/43 sender_localpart: _bot_{{ matrix_mautrix_twitter_appservice_bot_username }} diff --git a/roles/matrix-bridge-mautrix-whatsapp/defaults/main.yml b/roles/matrix-bridge-mautrix-whatsapp/defaults/main.yml index 9c8652fb..7a511651 100644 --- a/roles/matrix-bridge-mautrix-whatsapp/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-whatsapp/defaults/main.yml @@ -110,7 +110,7 @@ matrix_mautrix_whatsapp_configuration_extension: "{{ matrix_mautrix_whatsapp_con # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_whatsapp_configuration_yaml`. -matrix_mautrix_whatsapp_configuration: "{{ matrix_mautrix_whatsapp_configuration_yaml | from_yaml|combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}" +matrix_mautrix_whatsapp_configuration: "{{ matrix_mautrix_whatsapp_configuration_yaml | from_yaml | combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}" matrix_mautrix_whatsapp_registration_yaml: | id: whatsapp @@ -122,10 +122,10 @@ matrix_mautrix_whatsapp_registration_yaml: | rate_limited: false namespaces: users: - - regex: '^@whatsapp_[0-9]+:{{ matrix_mautrix_whatsapp_homeserver_domain|regex_escape }}$' + - regex: '^@whatsapp_[0-9]+:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$' exclusive: true - exclusive: true - regex: '^@{{ matrix_mautrix_whatsapp_appservice_bot_username|regex_escape }}:{{ matrix_mautrix_whatsapp_homeserver_domain|regex_escape }}$' + regex: '^@{{ matrix_mautrix_whatsapp_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$' de.sorunome.msc2409.push_ephemeral: true matrix_mautrix_whatsapp_registration: "{{ matrix_mautrix_whatsapp_registration_yaml | from_yaml }}" diff --git a/roles/matrix-bridge-mx-puppet-discord/defaults/main.yml b/roles/matrix-bridge-mx-puppet-discord/defaults/main.yml index 3402bbbc..085a19aa 100644 --- a/roles/matrix-bridge-mx-puppet-discord/defaults/main.yml +++ b/roles/matrix-bridge-mx-puppet-discord/defaults/main.yml @@ -36,7 +36,7 @@ matrix_mx_puppet_discord_bridge_mediaUrl: "https://{{ matrix_server_fqn_matrix } # "@.*:yourserver.com" to allow users on a specific homeserver # "@.*" to allow anyone matrix_mx_puppet_discord_provisioning_whitelist: - - "@.*:{{ matrix_domain|regex_escape }}" + - "@.*:{{ matrix_domain | regex_escape }}" # Leave empty to disable blacklist # "@user:server.com" disallow a specific user @@ -92,7 +92,7 @@ matrix_mx_puppet_discord_configuration_extension: "{{ matrix_mx_puppet_discord_c # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mx_puppet_discord_configuration_yaml`. -matrix_mx_puppet_discord_configuration: "{{ matrix_mx_puppet_discord_configuration_yaml | from_yaml|combine(matrix_mx_puppet_discord_configuration_extension, recursive=True) }}" +matrix_mx_puppet_discord_configuration: "{{ matrix_mx_puppet_discord_configuration_yaml | from_yaml | combine(matrix_mx_puppet_discord_configuration_extension, recursive=True) }}" matrix_mx_puppet_discord_registration_yaml: | as_token: "{{ matrix_mx_puppet_discord_appservice_token }}" @@ -101,11 +101,11 @@ matrix_mx_puppet_discord_registration_yaml: | namespaces: users: - exclusive: true - regex: '@_discordpuppet_.*:{{ matrix_mx_puppet_discord_homeserver_domain|regex_escape }}' + regex: '@_discordpuppet_.*:{{ matrix_mx_puppet_discord_homeserver_domain | regex_escape }}' rooms: [] aliases: - exclusive: true - regex: '#_discordpuppet_.*:{{ matrix_mx_puppet_discord_homeserver_domain|regex_escape }}' + regex: '#_discordpuppet_.*:{{ matrix_mx_puppet_discord_homeserver_domain | regex_escape }}' protocols: [] rate_limited: false sender_localpart: _discordpuppet_bot diff --git a/roles/matrix-bridge-mx-puppet-groupme/defaults/main.yml b/roles/matrix-bridge-mx-puppet-groupme/defaults/main.yml index f2f7d963..9f0918b6 100644 --- a/roles/matrix-bridge-mx-puppet-groupme/defaults/main.yml +++ b/roles/matrix-bridge-mx-puppet-groupme/defaults/main.yml @@ -32,7 +32,7 @@ matrix_mx_puppet_groupme_appservice_address: 'http://matrix-mx-puppet-groupme:{{ # "@.*:yourserver.com" to allow users on a specific homeserver # "@.*" to allow anyone matrix_mx_puppet_groupme_provisioning_whitelist: - - "@.*:{{ matrix_domain|regex_escape }}" + - "@.*:{{ matrix_domain | regex_escape }}" # Leave empty to disable blacklist # "@user:server.com" disallow a specific user @@ -87,7 +87,7 @@ matrix_mx_puppet_groupme_configuration_extension: "{{ matrix_mx_puppet_groupme_c # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mx_puppet_groupme_configuration_yaml`. -matrix_mx_puppet_groupme_configuration: "{{ matrix_mx_puppet_groupme_configuration_yaml | from_yaml|combine(matrix_mx_puppet_groupme_configuration_extension, recursive=True) }}" +matrix_mx_puppet_groupme_configuration: "{{ matrix_mx_puppet_groupme_configuration_yaml | from_yaml | combine(matrix_mx_puppet_groupme_configuration_extension, recursive=True) }}" matrix_mx_puppet_groupme_registration_yaml: | as_token: "{{ matrix_mx_puppet_groupme_appservice_token }}" @@ -96,11 +96,11 @@ matrix_mx_puppet_groupme_registration_yaml: | namespaces: users: - exclusive: true - regex: '@_groupmepuppet_.*:{{ matrix_mx_puppet_groupme_homeserver_domain|regex_escape }}' + regex: '@_groupmepuppet_.*:{{ matrix_mx_puppet_groupme_homeserver_domain | regex_escape }}' rooms: [] aliases: - exclusive: true - regex: '#_groupmepuppet_.*:{{ matrix_mx_puppet_groupme_homeserver_domain|regex_escape }}' + regex: '#_groupmepuppet_.*:{{ matrix_mx_puppet_groupme_homeserver_domain | regex_escape }}' protocols: [] rate_limited: false sender_localpart: _groupmepuppet_bot diff --git a/roles/matrix-bridge-mx-puppet-instagram/defaults/main.yml b/roles/matrix-bridge-mx-puppet-instagram/defaults/main.yml index 8c68f980..32f287d5 100644 --- a/roles/matrix-bridge-mx-puppet-instagram/defaults/main.yml +++ b/roles/matrix-bridge-mx-puppet-instagram/defaults/main.yml @@ -26,7 +26,7 @@ matrix_mx_puppet_instagram_appservice_address: 'http://matrix-mx-puppet-instagra # "@.*:yourserver.com" to allow users on a specific homeserver # "@.*" to allow anyone matrix_mx_puppet_instagram_provisioning_whitelist: - - "@.*:{{ matrix_domain|regex_escape }}" + - "@.*:{{ matrix_domain | regex_escape }}" # Leave empty to disable blacklist # "@user:server.com" disallow a specific user @@ -81,7 +81,7 @@ matrix_mx_puppet_instagram_configuration_extension: "{{ matrix_mx_puppet_instagr # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mx_puppet_instagram_configuration_yaml`. -matrix_mx_puppet_instagram_configuration: "{{ matrix_mx_puppet_instagram_configuration_yaml | from_yaml|combine(matrix_mx_puppet_instagram_configuration_extension, recursive=True) }}" +matrix_mx_puppet_instagram_configuration: "{{ matrix_mx_puppet_instagram_configuration_yaml | from_yaml | combine(matrix_mx_puppet_instagram_configuration_extension, recursive=True) }}" matrix_mx_puppet_instagram_registration_yaml: | as_token: "{{ matrix_mx_puppet_instagram_appservice_token }}" @@ -90,11 +90,11 @@ matrix_mx_puppet_instagram_registration_yaml: | namespaces: users: - exclusive: true - regex: '@_instagrampuppet_.*:{{ matrix_mx_puppet_instagram_homeserver_domain|regex_escape }}' + regex: '@_instagrampuppet_.*:{{ matrix_mx_puppet_instagram_homeserver_domain | regex_escape }}' rooms: [] aliases: - exclusive: true - regex: '#_instagrampuppet_.*:{{ matrix_mx_puppet_instagram_homeserver_domain|regex_escape }}' + regex: '#_instagrampuppet_.*:{{ matrix_mx_puppet_instagram_homeserver_domain | regex_escape }}' protocols: [] rate_limited: false sender_localpart: _instagrampuppet_bot diff --git a/roles/matrix-bridge-mx-puppet-slack/defaults/main.yml b/roles/matrix-bridge-mx-puppet-slack/defaults/main.yml index cc437ad8..eae0b933 100644 --- a/roles/matrix-bridge-mx-puppet-slack/defaults/main.yml +++ b/roles/matrix-bridge-mx-puppet-slack/defaults/main.yml @@ -40,7 +40,7 @@ matrix_mx_puppet_slack_redirect_uri: 'https://{{ matrix_server_fqn_matrix }}{{ m # "@.*:yourserver.com" to allow users on a specific homeserver # "@.*" to allow anyone matrix_mx_puppet_slack_provisioning_whitelist: - - "@.*:{{ matrix_domain|regex_escape }}" + - "@.*:{{ matrix_domain | regex_escape }}" # Leave empty to disable blacklist # "@user:server.com" disallow a specific user @@ -96,7 +96,7 @@ matrix_mx_puppet_slack_configuration_extension: "{{ matrix_mx_puppet_slack_confi # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mx_puppet_slack_configuration_yaml`. -matrix_mx_puppet_slack_configuration: "{{ matrix_mx_puppet_slack_configuration_yaml | from_yaml|combine(matrix_mx_puppet_slack_configuration_extension, recursive=True) }}" +matrix_mx_puppet_slack_configuration: "{{ matrix_mx_puppet_slack_configuration_yaml | from_yaml | combine(matrix_mx_puppet_slack_configuration_extension, recursive=True) }}" matrix_mx_puppet_slack_registration_yaml: | as_token: "{{ matrix_mx_puppet_slack_appservice_token }}" @@ -105,11 +105,11 @@ matrix_mx_puppet_slack_registration_yaml: | namespaces: users: - exclusive: true - regex: '@_slackpuppet_.*:{{ matrix_mx_puppet_slack_homeserver_domain|regex_escape }}' + regex: '@_slackpuppet_.*:{{ matrix_mx_puppet_slack_homeserver_domain | regex_escape }}' rooms: [] aliases: - exclusive: true - regex: '#_slackpuppet_.*:{{ matrix_mx_puppet_slack_homeserver_domain|regex_escape }}' + regex: '#_slackpuppet_.*:{{ matrix_mx_puppet_slack_homeserver_domain | regex_escape }}' protocols: [] rate_limited: false sender_localpart: _slackpuppet_bot diff --git a/roles/matrix-bridge-mx-puppet-steam/defaults/main.yml b/roles/matrix-bridge-mx-puppet-steam/defaults/main.yml index 933b043c..e4140333 100644 --- a/roles/matrix-bridge-mx-puppet-steam/defaults/main.yml +++ b/roles/matrix-bridge-mx-puppet-steam/defaults/main.yml @@ -32,7 +32,7 @@ matrix_mx_puppet_steam_appservice_address: 'http://matrix-mx-puppet-steam:{{ mat # "@.*:yourserver.com" to allow users on a specific homeserver # "@.*" to allow anyone matrix_mx_puppet_steam_provisioning_whitelist: - - "@.*:{{ matrix_domain|regex_escape }}" + - "@.*:{{ matrix_domain | regex_escape }}" # Leave empty to disable blacklist # "@user:server.com" disallow a specific user @@ -87,7 +87,7 @@ matrix_mx_puppet_steam_configuration_extension: "{{ matrix_mx_puppet_steam_confi # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mx_puppet_steam_configuration_yaml`. -matrix_mx_puppet_steam_configuration: "{{ matrix_mx_puppet_steam_configuration_yaml | from_yaml|combine(matrix_mx_puppet_steam_configuration_extension, recursive=True) }}" +matrix_mx_puppet_steam_configuration: "{{ matrix_mx_puppet_steam_configuration_yaml | from_yaml | combine(matrix_mx_puppet_steam_configuration_extension, recursive=True) }}" matrix_mx_puppet_steam_registration_yaml: | as_token: "{{ matrix_mx_puppet_steam_appservice_token }}" @@ -96,11 +96,11 @@ matrix_mx_puppet_steam_registration_yaml: | namespaces: users: - exclusive: true - regex: '@_steampuppet_.*:{{ matrix_mx_puppet_steam_homeserver_domain|regex_escape }}' + regex: '@_steampuppet_.*:{{ matrix_mx_puppet_steam_homeserver_domain | regex_escape }}' rooms: [] aliases: - exclusive: true - regex: '#_steampuppet_.*:{{ matrix_mx_puppet_steam_homeserver_domain|regex_escape }}' + regex: '#_steampuppet_.*:{{ matrix_mx_puppet_steam_homeserver_domain | regex_escape }}' protocols: [] rate_limited: false sender_localpart: _steampuppet_bot diff --git a/roles/matrix-bridge-mx-puppet-twitter/defaults/main.yml b/roles/matrix-bridge-mx-puppet-twitter/defaults/main.yml index bcd6b4ff..73674220 100644 --- a/roles/matrix-bridge-mx-puppet-twitter/defaults/main.yml +++ b/roles/matrix-bridge-mx-puppet-twitter/defaults/main.yml @@ -41,7 +41,7 @@ matrix_mx_puppet_twitter_webhook_url: 'https://{{ matrix_server_fqn_matrix }}{{ # "@.*:yourserver.com" to allow users on a specific homeserver # "@.*" to allow anyone matrix_mx_puppet_twitter_provisioning_whitelist: - - "@.*:{{ matrix_domain|regex_escape }}" + - "@.*:{{ matrix_domain | regex_escape }}" # Leave empty to disable blacklist # "@user:server.com" disallow a specific user @@ -97,7 +97,7 @@ matrix_mx_puppet_twitter_configuration_extension: "{{ matrix_mx_puppet_twitter_c # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_mx_puppet_twitter_configuration_yaml`. -matrix_mx_puppet_twitter_configuration: "{{ matrix_mx_puppet_twitter_configuration_yaml | from_yaml|combine(matrix_mx_puppet_twitter_configuration_extension, recursive=True) }}" +matrix_mx_puppet_twitter_configuration: "{{ matrix_mx_puppet_twitter_configuration_yaml | from_yaml | combine(matrix_mx_puppet_twitter_configuration_extension, recursive=True) }}" # The prefix for user IDs and aliases matrix_mx_puppet_twitter_namespace_prefix: _twitterpuppet_ @@ -110,11 +110,11 @@ matrix_mx_puppet_twitter_registration_yaml: | namespaces: users: - exclusive: true - regex: '@{{ matrix_mx_puppet_twitter_namespace_prefix|regex_escape }}.*:{{ matrix_mx_puppet_twitter_homeserver_domain|regex_escape }}' + regex: '@{{ matrix_mx_puppet_twitter_namespace_prefix | regex_escape }}.*:{{ matrix_mx_puppet_twitter_homeserver_domain | regex_escape }}' rooms: [] aliases: - exclusive: true - regex: '#{{ matrix_mx_puppet_twitter_namespace_prefix|regex_escape }}.*:{{ matrix_mx_puppet_twitter_homeserver_domain|regex_escape }}' + regex: '#{{ matrix_mx_puppet_twitter_namespace_prefix | regex_escape }}.*:{{ matrix_mx_puppet_twitter_homeserver_domain | regex_escape }}' protocols: [] rate_limited: false sender_localpart: "{{ matrix_mx_puppet_twitter_bot_localpart }}" diff --git a/roles/matrix-bridge-mx-puppet-twitter/tasks/setup_install.yml b/roles/matrix-bridge-mx-puppet-twitter/tasks/setup_install.yml index 23d4a3a6..52c02fa9 100644 --- a/roles/matrix-bridge-mx-puppet-twitter/tasks/setup_install.yml +++ b/roles/matrix-bridge-mx-puppet-twitter/tasks/setup_install.yml @@ -81,6 +81,7 @@ - name: Ensure MX Puppet Twitter repository is present on self build ansible.builtin.git: repo: "{{ matrix_mx_puppet_twitter_container_image_self_build_repo }}" + version: master dest: "{{ matrix_mx_puppet_twitter_docker_src_files_path }}" force: "yes" become: true diff --git a/roles/matrix-bridge-sms/defaults/main.yml b/roles/matrix-bridge-sms/defaults/main.yml index 28a88e31..b4755d71 100644 --- a/roles/matrix-bridge-sms/defaults/main.yml +++ b/roles/matrix-bridge-sms/defaults/main.yml @@ -106,7 +106,7 @@ matrix_sms_bridge_configuration_extension_yaml: | matrix_sms_bridge_configuration_extension: "{{ matrix_sms_bridge_configuration_extension_yaml | from_yaml if matrix_sms_bridge_configuration_extension_yaml | from_yaml is mapping else {} }}" -matrix_sms_bridge_configuration: "{{ matrix_sms_bridge_configuration_yaml | from_yaml|combine(matrix_sms_bridge_configuration_extension, recursive=True) }}" +matrix_sms_bridge_configuration: "{{ matrix_sms_bridge_configuration_yaml | from_yaml | combine(matrix_sms_bridge_configuration_extension, recursive=True) }}" matrix_sms_bridge_registration_yaml: | id: sms @@ -115,10 +115,10 @@ matrix_sms_bridge_registration_yaml: | namespaces: users: - exclusive: true - regex: '^@sms_.+:{{ matrix_sms_bridge_homserver_domain|regex_escape }}$' + regex: '^@sms_.+:{{ matrix_sms_bridge_homserver_domain | regex_escape }}$' aliases: - exclusive: true - regex: '^#sms_.+:{{ matrix_sms_bridge_homserver_domain|regex_escape }}$' + regex: '^#sms_.+:{{ matrix_sms_bridge_homserver_domain | regex_escape }}$' url: {{ matrix_sms_bridge_appservice_url }} sender_localpart: smsbot rate_limited: false diff --git a/roles/matrix-client-cinny/defaults/main.yml b/roles/matrix-client-cinny/defaults/main.yml index 277f6e0c..efd88010 100644 --- a/roles/matrix-client-cinny/defaults/main.yml +++ b/roles/matrix-client-cinny/defaults/main.yml @@ -50,8 +50,8 @@ matrix_client_cinny_configuration_default: "{{ lookup('template', 'templates/con # completely redefining `matrix_client_cinny_configuration_default`. matrix_client_cinny_configuration_extension_json: '{}' -matrix_client_cinny_configuration_extension: "{{ matrix_client_cinny_configuration_extension_json|from_json if matrix_client_cinny_configuration_extension_json|from_json is mapping else {} }}" +matrix_client_cinny_configuration_extension: "{{ matrix_client_cinny_configuration_extension_json | from_json if matrix_client_cinny_configuration_extension_json | from_json is mapping else {} }}" # Holds the final cinny configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_client_cinny_configuration_default`. -matrix_client_cinny_configuration: "{{ matrix_client_cinny_configuration_default|combine(matrix_client_cinny_configuration_extension, recursive=True) }}" +matrix_client_cinny_configuration: "{{ matrix_client_cinny_configuration_default | combine(matrix_client_cinny_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-client-cinny/tasks/setup_install.yml b/roles/matrix-client-cinny/tasks/setup_install.yml index 0159ea35..755b872f 100644 --- a/roles/matrix-client-cinny/tasks/setup_install.yml +++ b/roles/matrix-client-cinny/tasks/setup_install.yml @@ -36,7 +36,7 @@ - name: Ensure Cinny configuration installed ansible.builtin.copy: - content: "{{ matrix_client_cinny_configuration|to_nice_json }}" + content: "{{ matrix_client_cinny_configuration | to_nice_json }}" dest: "{{ matrix_client_cinny_data_path }}/config.json" mode: 0644 owner: "{{ matrix_user_username }}" diff --git a/roles/matrix-client-cinny/templates/config.json.j2 b/roles/matrix-client-cinny/templates/config.json.j2 index 9731a372..0da710ac 100644 --- a/roles/matrix-client-cinny/templates/config.json.j2 +++ b/roles/matrix-client-cinny/templates/config.json.j2 @@ -1,6 +1,6 @@ { "defaultHomeserver": 0, "homeserverList": [ - {{ matrix_client_cinny_default_hs_url|string|to_json }} + {{ matrix_client_cinny_default_hs_url | string|to_json }} ] } diff --git a/roles/matrix-client-element/defaults/main.yml b/roles/matrix-client-element/defaults/main.yml index e93b2c7c..e710d0f7 100644 --- a/roles/matrix-client-element/defaults/main.yml +++ b/roles/matrix-client-element/defaults/main.yml @@ -129,8 +129,8 @@ matrix_client_element_configuration_default: "{{ lookup('template', 'templates/c # } matrix_client_element_configuration_extension_json: '{}' -matrix_client_element_configuration_extension: "{{ matrix_client_element_configuration_extension_json|from_json if matrix_client_element_configuration_extension_json|from_json is mapping else {} }}" +matrix_client_element_configuration_extension: "{{ matrix_client_element_configuration_extension_json | from_json if matrix_client_element_configuration_extension_json | from_json is mapping else {} }}" # Holds the final Element configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_client_element_configuration_default`. -matrix_client_element_configuration: "{{ matrix_client_element_configuration_default|combine(matrix_client_element_configuration_extension, recursive=True) }}" +matrix_client_element_configuration: "{{ matrix_client_element_configuration_default | combine(matrix_client_element_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-client-element/tasks/setup_install.yml b/roles/matrix-client-element/tasks/setup_install.yml index 356d5342..5fa34fa6 100644 --- a/roles/matrix-client-element/tasks/setup_install.yml +++ b/roles/matrix-client-element/tasks/setup_install.yml @@ -63,7 +63,7 @@ - name: Ensure Element configuration installed ansible.builtin.copy: - content: "{{ matrix_client_element_configuration|to_nice_json }}" + content: "{{ matrix_client_element_configuration | to_nice_json }}" dest: "{{ matrix_client_element_data_path }}/config.json" mode: 0644 owner: "{{ matrix_user_username }}" diff --git a/roles/matrix-client-element/templates/config.json.j2 b/roles/matrix-client-element/templates/config.json.j2 index e87907e4..e3477398 100644 --- a/roles/matrix-client-element/templates/config.json.j2 +++ b/roles/matrix-client-element/templates/config.json.j2 @@ -1,25 +1,25 @@ { "default_server_config": { "m.homeserver": { - "base_url": {{ matrix_client_element_default_hs_url|string|to_json }}, - "server_name": {{ matrix_client_element_default_server_name|string|to_json }} + "base_url": {{ matrix_client_element_default_hs_url | string|to_json }}, + "server_name": {{ matrix_client_element_default_server_name | string|to_json }} }, "m.identity_server": { - "base_url": {{ matrix_client_element_default_is_url|string|to_json }} + "base_url": {{ matrix_client_element_default_is_url | string|to_json }} } }, "settingDefaults": { "custom_themes": {{ matrix_client_element_settingDefaults_custom_themes|to_json }} }, - "default_theme": {{ matrix_client_element_default_theme|string|to_json }}, - "permalinkPrefix": {{ matrix_client_element_permalinkPrefix|string|to_json }}, + "default_theme": {{ matrix_client_element_default_theme | string|to_json }}, + "permalinkPrefix": {{ matrix_client_element_permalinkPrefix | string|to_json }}, "disable_custom_urls": {{ matrix_client_element_disable_custom_urls|to_json }}, "disable_guests": {{ matrix_client_element_disable_guests|to_json }}, "brand": {{ matrix_client_element_brand|to_json }}, - "integrations_ui_url": {{ matrix_client_element_integrations_ui_url|string|to_json }}, - "integrations_rest_url": {{ matrix_client_element_integrations_rest_url|string|to_json }}, + "integrations_ui_url": {{ matrix_client_element_integrations_ui_url | string|to_json }}, + "integrations_rest_url": {{ matrix_client_element_integrations_rest_url | string|to_json }}, "integrations_widgets_urls": {{ matrix_client_element_integrations_widgets_urls|to_json }}, - "integrations_jitsi_widget_url": {{ matrix_client_element_integrations_jitsi_widget_url|string|to_json }}, + "integrations_jitsi_widget_url": {{ matrix_client_element_integrations_jitsi_widget_url | string|to_json }}, "bug_report_endpoint_url": {{ matrix_client_element_bug_report_endpoint_url|to_json }}, "showLabsSettings": {{ matrix_client_element_showLabsSettings|to_json }}, "roomDirectory": { @@ -30,7 +30,7 @@ "enable_presence_by_hs_url": {{ matrix_client_element_enable_presence_by_hs_url|to_json }}, {% endif %} "embeddedPages": { - "homeUrl": {{ matrix_client_element_embedded_pages_home_url|string|to_json }} + "homeUrl": {{ matrix_client_element_embedded_pages_home_url | string|to_json }} }, {% if matrix_client_element_jitsi_preferredDomain %} "jitsi": { diff --git a/roles/matrix-client-hydrogen/defaults/main.yml b/roles/matrix-client-hydrogen/defaults/main.yml index 8171fc12..1baccdd3 100644 --- a/roles/matrix-client-hydrogen/defaults/main.yml +++ b/roles/matrix-client-hydrogen/defaults/main.yml @@ -64,8 +64,8 @@ matrix_client_hydrogen_configuration_default: "{{ lookup('template', 'templates/ # } matrix_client_hydrogen_configuration_extension_json: '{}' -matrix_client_hydrogen_configuration_extension: "{{ matrix_client_hydrogen_configuration_extension_json|from_json if matrix_client_hydrogen_configuration_extension_json|from_json is mapping else {} }}" +matrix_client_hydrogen_configuration_extension: "{{ matrix_client_hydrogen_configuration_extension_json | from_json if matrix_client_hydrogen_configuration_extension_json | from_json is mapping else {} }}" # Holds the final Hydrogen configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_client_hydrogen_configuration_default`. -matrix_client_hydrogen_configuration: "{{ matrix_client_hydrogen_configuration_default|combine(matrix_client_hydrogen_configuration_extension, recursive=True) }}" +matrix_client_hydrogen_configuration: "{{ matrix_client_hydrogen_configuration_default | combine(matrix_client_hydrogen_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-client-hydrogen/tasks/setup_install.yml b/roles/matrix-client-hydrogen/tasks/setup_install.yml index 37877b87..4cd445d0 100644 --- a/roles/matrix-client-hydrogen/tasks/setup_install.yml +++ b/roles/matrix-client-hydrogen/tasks/setup_install.yml @@ -37,7 +37,7 @@ - name: Ensure Hydrogen configuration installed ansible.builtin.copy: - content: "{{ matrix_client_hydrogen_configuration|to_nice_json }}" + content: "{{ matrix_client_hydrogen_configuration | to_nice_json }}" dest: "{{ matrix_client_hydrogen_docker_src_files_path }}/src/platform/web/assets/config.json" mode: 0644 owner: "{{ matrix_user_username }}" diff --git a/roles/matrix-client-hydrogen/templates/config.json.j2 b/roles/matrix-client-hydrogen/templates/config.json.j2 index 3e556354..0c4331b6 100644 --- a/roles/matrix-client-hydrogen/templates/config.json.j2 +++ b/roles/matrix-client-hydrogen/templates/config.json.j2 @@ -4,7 +4,7 @@ "gatewayUrl": "https://matrix.org", "applicationServerKey": "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM" }, - "defaultHomeServer": {{ matrix_client_hydrogen_default_hs_url|string|to_json }}, + "defaultHomeServer": {{ matrix_client_hydrogen_default_hs_url | string|to_json }}, "bugReportEndpointUrl": "https://element.io/bugreports/submit", "themeManifests": [ "assets/theme-Element.json" diff --git a/roles/matrix-corporal/defaults/main.yml b/roles/matrix-corporal/defaults/main.yml index 1aa512ee..bb1b8fa1 100644 --- a/roles/matrix-corporal/defaults/main.yml +++ b/roles/matrix-corporal/defaults/main.yml @@ -100,8 +100,8 @@ matrix_corporal_configuration_default: "{{ lookup('template', 'templates/config. # } matrix_corporal_configuration_extension_json: '{}' -matrix_corporal_configuration_extension: "{{ matrix_corporal_configuration_extension_json|from_json if matrix_corporal_configuration_extension_json|from_json is mapping else {} }}" +matrix_corporal_configuration_extension: "{{ matrix_corporal_configuration_extension_json | from_json if matrix_corporal_configuration_extension_json | from_json is mapping else {} }}" # Holds the final Corporal configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_corporal_configuration_default`. -matrix_corporal_configuration: "{{ matrix_corporal_configuration_default|combine(matrix_corporal_configuration_extension, recursive=True) }}" +matrix_corporal_configuration: "{{ matrix_corporal_configuration_default | combine(matrix_corporal_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-corporal/tasks/setup_corporal.yml b/roles/matrix-corporal/tasks/setup_corporal.yml index 2f745502..583c27eb 100644 --- a/roles/matrix-corporal/tasks/setup_corporal.yml +++ b/roles/matrix-corporal/tasks/setup_corporal.yml @@ -54,7 +54,7 @@ - name: Ensure Matrix Corporal config installed ansible.builtin.copy: - content: "{{ matrix_corporal_configuration|to_nice_json }}" + content: "{{ matrix_corporal_configuration | to_nice_json }}" dest: "{{ matrix_corporal_config_dir_path }}/config.json" mode: 0644 owner: "{{ matrix_user_username }}" diff --git a/roles/matrix-dendrite/defaults/main.yml b/roles/matrix-dendrite/defaults/main.yml index d790fcc9..dd6d351e 100644 --- a/roles/matrix-dendrite/defaults/main.yml +++ b/roles/matrix-dendrite/defaults/main.yml @@ -27,10 +27,10 @@ matrix_dendrite_http_bind_port: 8008 matrix_dendrite_https_bind_port: ~ # This is passed as an `-http-bind-address` flag to the Dendrite server in the container -matrix_dendrite_http_bind_address: "{{ (':' + matrix_dendrite_http_bind_port|string) if matrix_dendrite_http_bind_port else '' }}" +matrix_dendrite_http_bind_address: "{{ (':' + matrix_dendrite_http_bind_port | string) if matrix_dendrite_http_bind_port else '' }}" # This is passed as an `-https-bind-address` flag to the Dendrite server in the container -matrix_dendrite_https_bind_address: "{{ (':' + matrix_dendrite_https_bind_port|string) if matrix_dendrite_https_bind_port else '' }}" +matrix_dendrite_https_bind_address: "{{ (':' + matrix_dendrite_https_bind_port | string) if matrix_dendrite_https_bind_port else '' }}" # Controls whether the matrix-dendrite container exposes the HTTP port (tcp/{{ matrix_dendrite_http_bind_port }} in the container). # @@ -171,4 +171,4 @@ matrix_dendrite_configuration_extension: "{{ matrix_dendrite_configuration_exten # Holds the final Dendrite configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_dendrite_configuration_yaml`. -matrix_dendrite_configuration: "{{ matrix_dendrite_configuration_yaml | from_yaml|combine(matrix_dendrite_configuration_extension, recursive=True) }}" +matrix_dendrite_configuration: "{{ matrix_dendrite_configuration_yaml | from_yaml | combine(matrix_dendrite_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 b/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 index fcede405..29f5c55f 100644 --- a/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 +++ b/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 @@ -165,7 +165,7 @@ client_api: # If set, allows registration by anyone who knows the shared secret, regardless of # whether registration is otherwise disabled. - registration_shared_secret: {{ matrix_dendrite_registration_shared_secret|string|to_json }} + registration_shared_secret: {{ matrix_dendrite_registration_shared_secret | string|to_json }} # Whether to require reCAPTCHA for registration. enable_registration_captcha: {{ matrix_dendrite_enable_registration_captcha|to_json }} diff --git a/roles/matrix-dendrite/vars/main.yml b/roles/matrix-dendrite/vars/main.yml index d0c07c0c..fcf020c2 100644 --- a/roles/matrix-dendrite/vars/main.yml +++ b/roles/matrix-dendrite/vars/main.yml @@ -5,7 +5,7 @@ matrix_dendrite_federation_api_url_endpoint_public: "https://{{ matrix_server_fq # Tells whether this role had executed or not. Toggled to `true` during runtime. matrix_dendrite_role_executed: false -matrix_dendrite_media_store_parent_path: "{{ matrix_dendrite_media_store_path|dirname }}" +matrix_dendrite_media_store_parent_path: "{{ matrix_dendrite_media_store_path | dirname }}" matrix_dendrite_media_store_directory_name: "{{ matrix_dendrite_media_store_path | basename }}" matrix_dendrite_signing_key_file_name: "{{ matrix_dendrite_signing_key | basename }}" diff --git a/roles/matrix-dimension/defaults/main.yml b/roles/matrix-dimension/defaults/main.yml index 1af7f293..a330accb 100644 --- a/roles/matrix-dimension/defaults/main.yml +++ b/roles/matrix-dimension/defaults/main.yml @@ -97,4 +97,4 @@ matrix_dimension_configuration_extension: "{{ matrix_dimension_configuration_ext # Holds the final Dimension configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_dimension_configuration_yaml`. -matrix_dimension_configuration: "{{ matrix_dimension_configuration_yaml | from_yaml|combine(matrix_dimension_configuration_extension, recursive=True) }}" +matrix_dimension_configuration: "{{ matrix_dimension_configuration_yaml | from_yaml | combine(matrix_dimension_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-dynamic-dns/defaults/main.yml b/roles/matrix-dynamic-dns/defaults/main.yml index 1da87f38..bdeea0f1 100644 --- a/roles/matrix-dynamic-dns/defaults/main.yml +++ b/roles/matrix-dynamic-dns/defaults/main.yml @@ -29,6 +29,7 @@ matrix_dynamic_dns_systemd_required_services_list: ['docker.service'] # Build the container from source when running in mode matrix_dynamic_dns_container_image_self_build: false matrix_dynamic_dns_container_image_self_build_repo: "https://github.com/linuxserver/docker-ddclient.git" +matrix_dynamic_dns_container_image_self_build_repo_branch: "{{ matrix_dynamic_dns_version }}" # Config paths matrix_dynamic_dns_base_path: "{{ matrix_base_data_path }}/dynamic-dns" diff --git a/roles/matrix-dynamic-dns/tasks/install.yml b/roles/matrix-dynamic-dns/tasks/install.yml index 8c7f3fc7..e83637bf 100644 --- a/roles/matrix-dynamic-dns/tasks/install.yml +++ b/roles/matrix-dynamic-dns/tasks/install.yml @@ -28,6 +28,7 @@ - name: Ensure Dynamic DNS repository is present on self build ansible.builtin.git: repo: "{{ matrix_dynamic_dns_container_image_self_build_repo }}" + version: "{{ matrix_dynamic_dns_container_image_self_build_repo_branch }}" dest: "{{ matrix_dynamic_dns_docker_src_files_path }}" force: "yes" become: true diff --git a/roles/matrix-email2matrix/templates/config.json.j2 b/roles/matrix-email2matrix/templates/config.json.j2 index c1be97fd..a7ca7bc4 100644 --- a/roles/matrix-email2matrix/templates/config.json.j2 +++ b/roles/matrix-email2matrix/templates/config.json.j2 @@ -6,7 +6,7 @@ "Workers": 10 }, "Matrix": { - "Mappings": {{ matrix_email2matrix_matrix_mappings|to_nice_json }} + "Mappings": {{ matrix_email2matrix_matrix_mappings | to_nice_json }} }, "Misc": { "Debug": {{ matrix_email2matrix_misc_debug|to_json }} diff --git a/roles/matrix-etherpad/defaults/main.yml b/roles/matrix-etherpad/defaults/main.yml index 656e43f9..8281f27f 100644 --- a/roles/matrix-etherpad/defaults/main.yml +++ b/roles/matrix-etherpad/defaults/main.yml @@ -88,8 +88,8 @@ matrix_etherpad_configuration_default: "{{ lookup('template', 'templates/setting # matrix_etherpad_configuration_extension_json: '{}' -matrix_etherpad_configuration_extension: "{{ matrix_etherpad_configuration_extension_json|from_json if matrix_etherpad_configuration_extension_json|from_json is mapping else {} }}" +matrix_etherpad_configuration_extension: "{{ matrix_etherpad_configuration_extension_json | from_json if matrix_etherpad_configuration_extension_json | from_json is mapping else {} }}" # Holds the final Etherpad configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_etherpad_configuration_json`. -matrix_etherpad_configuration: "{{ matrix_etherpad_configuration_default|combine(matrix_etherpad_configuration_extension, recursive=True) }}" +matrix_etherpad_configuration: "{{ matrix_etherpad_configuration_default | combine(matrix_etherpad_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-etherpad/tasks/setup_install.yml b/roles/matrix-etherpad/tasks/setup_install.yml index e3b1397f..0243e9d7 100644 --- a/roles/matrix-etherpad/tasks/setup_install.yml +++ b/roles/matrix-etherpad/tasks/setup_install.yml @@ -10,7 +10,7 @@ - name: Ensure Etherpad config installed ansible.builtin.copy: - content: "{{ matrix_etherpad_configuration|to_nice_json }}" + content: "{{ matrix_etherpad_configuration | to_nice_json }}" dest: "{{ matrix_etherpad_base_path }}/settings.json" mode: 0640 owner: "{{ matrix_etherpad_user_uid }}" diff --git a/roles/matrix-jitsi/tasks/util/setup_jitsi_auth.yml b/roles/matrix-jitsi/tasks/util/setup_jitsi_auth.yml index 8c25fa3a..d9da9ebe 100644 --- a/roles/matrix-jitsi/tasks/util/setup_jitsi_auth.yml +++ b/roles/matrix-jitsi/tasks/util/setup_jitsi_auth.yml @@ -15,11 +15,13 @@ # - name: Ensure Jitsi internal authentication users are configured - ansible.builtin.shell: "docker exec matrix-jitsi-prosody prosodyctl --config /config/prosody.cfg.lua register {{ item.username | quote }} meet.jitsi {{ item.password | quote }}" + ansible.builtin.shell: "{{ matrix_host_command_docker }} exec matrix-jitsi-prosody prosodyctl --config /config/prosody.cfg.lua register {{ item.username | quote }} meet.jitsi {{ item.password | quote }}" with_items: "{{ matrix_jitsi_prosody_auth_internal_accounts }}" when: - matrix_jitsi_auth_type == "internal" - matrix_jitsi_prosody_auth_internal_accounts|length > 0 + register: matrix_jitsi_user_configuration_result + changed_when: matrix_jitsi_user_configuration_result.rc == 0 # # Tasks related to configuring other Jitsi authentication mechanisms diff --git a/roles/matrix-ma1sd/defaults/main.yml b/roles/matrix-ma1sd/defaults/main.yml index b62225e7..65768265 100644 --- a/roles/matrix-ma1sd/defaults/main.yml +++ b/roles/matrix-ma1sd/defaults/main.yml @@ -160,4 +160,4 @@ matrix_ma1sd_configuration_extension: "{{ matrix_ma1sd_configuration_extension_y # Holds the final ma1sd configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_ma1sd_configuration_yaml`. -matrix_ma1sd_configuration: "{{ matrix_ma1sd_configuration_yaml | from_yaml|combine(matrix_ma1sd_configuration_extension, recursive=True) }}" +matrix_ma1sd_configuration: "{{ matrix_ma1sd_configuration_yaml | from_yaml | combine(matrix_ma1sd_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-ma1sd/tasks/setup_install.yml b/roles/matrix-ma1sd/tasks/setup_install.yml index 3995da24..61f01b29 100644 --- a/roles/matrix-ma1sd/tasks/setup_install.yml +++ b/roles/matrix-ma1sd/tasks/setup_install.yml @@ -90,9 +90,11 @@ register: matrix_ma1sd_git_pull_results - name: Ensure ma1sd Docker image is built - ansible.builtin.shell: "DOCKER_BUILDKIT=1 ./gradlew dockerBuild" - args: + ansible.builtin.command: + cmd: ./gradlew dockerBuild chdir: "{{ matrix_ma1sd_docker_src_files_path }}" + environment: + DOCKER_BUILDKIT: 1 when: matrix_ma1sd_git_pull_results.changed - name: Ensure ma1sd Docker image is tagged correctly diff --git a/roles/matrix-nginx-proxy/tasks/nginx-proxy/setup_metrics_auth.yml b/roles/matrix-nginx-proxy/tasks/nginx-proxy/setup_metrics_auth.yml index 5d100577..c511e402 100644 --- a/roles/matrix-nginx-proxy/tasks/nginx-proxy/setup_metrics_auth.yml +++ b/roles/matrix-nginx-proxy/tasks/nginx-proxy/setup_metrics_auth.yml @@ -51,6 +51,7 @@ {{ matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_apache_container_image }} -c 'cat /password | htpasswd -i -c /data/matrix-metrics-htpasswd {{ matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_username }} && chmod 600 /data/matrix-metrics-htpasswd' + changed_when: true - name: Delete temporary metrics password file ansible.builtin.file: diff --git a/roles/matrix-nginx-proxy/tasks/self_check_well_known_file.yml b/roles/matrix-nginx-proxy/tasks/self_check_well_known_file.yml index 0a7b5845..95a43dea 100644 --- a/roles/matrix-nginx-proxy/tasks/self_check_well_known_file.yml +++ b/roles/matrix-nginx-proxy/tasks/self_check_well_known_file.yml @@ -25,7 +25,7 @@ - name: Parse JSON for well-known payload at the matrix hostname ansible.builtin.set_fact: - well_known_matrix_payload: "{{ result_well_known_matrix.content|from_json }}" + well_known_matrix_payload: "{{ result_well_known_matrix.content | from_json }}" - name: Fail if .well-known not CORS-aware on the matrix hostname ansible.builtin.fail: @@ -55,7 +55,7 @@ - name: Parse JSON for well-known payload at the identity hostname ansible.builtin.set_fact: - well_known_identity_payload: "{{ result_well_known_identity.content|from_json }}" + well_known_identity_payload: "{{ result_well_known_identity.content | from_json }}" - name: Fail if .well-known not CORS-aware on the identity hostname ansible.builtin.fail: diff --git a/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml b/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml index 889a33ba..d0b254a2 100644 --- a/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml +++ b/roles/matrix-nginx-proxy/tasks/ssl/setup_ssl_self_signed_obtain_for_domain.yml @@ -13,7 +13,7 @@ # In order to do any sort of generation (below), we need to ensure the directory exists first - name: Ensure SSL certificate directory exists ansible.builtin.file: - path: "{{ matrix_ssl_certificate_csr_path|dirname }}" + path: "{{ matrix_ssl_certificate_csr_path | dirname }}" state: directory mode: 0750 owner: "{{ matrix_user_username }}" diff --git a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 index 69f13a1a..735f4538 100644 --- a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 +++ b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-synapse.conf.j2 @@ -1,9 +1,9 @@ #jinja2: lstrip_blocks: "True" -{% set generic_workers = matrix_nginx_proxy_synapse_workers_list|selectattr('type', 'equalto', 'generic_worker')|list %} -{% set media_repository_workers = matrix_nginx_proxy_synapse_workers_list|selectattr('type', 'equalto', 'media_repository')|list %} -{% set user_dir_workers = matrix_nginx_proxy_synapse_workers_list|selectattr('type', 'equalto', 'user_dir')|list %} -{% set frontend_proxy_workers = matrix_nginx_proxy_synapse_workers_list|selectattr('type', 'equalto', 'frontend_proxy')|list %} +{% set generic_workers = matrix_nginx_proxy_synapse_workers_list | selectattr('type', 'equalto', 'generic_worker') | list %} +{% set media_repository_workers = matrix_nginx_proxy_synapse_workers_list | selectattr('type', 'equalto', 'media_repository') | list %} +{% set user_dir_workers = matrix_nginx_proxy_synapse_workers_list | selectattr('type', 'equalto', 'user_dir') | list %} +{% set frontend_proxy_workers = matrix_nginx_proxy_synapse_workers_list | selectattr('type', 'equalto', 'frontend_proxy') | list %} {% if matrix_nginx_proxy_synapse_workers_enabled %} {% if matrix_nginx_proxy_synapse_cache_enabled %} proxy_cache_path {{ matrix_nginx_proxy_synapse_cache_path }} levels=1:2 keys_zone={{ matrix_nginx_proxy_synapse_cache_keys_zone_name }}:{{ matrix_nginx_proxy_synapse_cache_keys_zone_size }} inactive={{ matrix_nginx_proxy_synapse_cache_inactive_time }} max_size={{ matrix_nginx_proxy_synapse_cache_max_size_mb }}m; diff --git a/roles/matrix-ntfy/defaults/main.yml b/roles/matrix-ntfy/defaults/main.yml index 9f0a6eb8..66bc5be4 100644 --- a/roles/matrix-ntfy/defaults/main.yml +++ b/roles/matrix-ntfy/defaults/main.yml @@ -45,4 +45,4 @@ matrix_ntfy_configuration_extension: "{{ matrix_ntfy_configuration_extension_yam # Holds the final ntfy configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_ntfy_configuration_yaml`. -matrix_ntfy_configuration: "{{ matrix_ntfy_configuration_yaml | from_yaml|combine(matrix_ntfy_configuration_extension, recursive=True) }}" +matrix_ntfy_configuration: "{{ matrix_ntfy_configuration_yaml | from_yaml | combine(matrix_ntfy_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-postgres-backup/tasks/util/detect_existing_postgres_version.yml b/roles/matrix-postgres-backup/tasks/util/detect_existing_postgres_version.yml index cce35e00..877e5934 100644 --- a/roles/matrix-postgres-backup/tasks/util/detect_existing_postgres_version.yml +++ b/roles/matrix-postgres-backup/tasks/util/detect_existing_postgres_version.yml @@ -27,7 +27,7 @@ - name: Determine existing Postgres version (make sense of PG_VERSION file) ansible.builtin.set_fact: - matrix_postgres_backup_detected_version: "{{ result_pg_version['content']|b64decode|replace('\n', '') }}" + matrix_postgres_backup_detected_version: "{{ result_pg_version['content'] | b64decode | replace('\n', '') }}" when: matrix_postgres_backup_detected_existing | bool - name: Determine corresponding Docker image to detected version (assume default of latest) diff --git a/roles/matrix-postgres/tasks/util/create_additional_database.yml b/roles/matrix-postgres/tasks/util/create_additional_database.yml index b4fee2c8..da95b870 100644 --- a/roles/matrix-postgres/tasks/util/create_additional_database.yml +++ b/roles/matrix-postgres/tasks/util/create_additional_database.yml @@ -33,6 +33,7 @@ {{ matrix_postgres_docker_image_to_use }} -c 'psql -h {{ matrix_postgres_connection_hostname }} --file=/matrix-postgres-init-additional-db-user-and-role.sql' + changed_when: true - name: Delete additional database initialization SQL file for {{ additional_db.name }} ansible.builtin.file: diff --git a/roles/matrix-postgres/tasks/util/detect_existing_postgres_version.yml b/roles/matrix-postgres/tasks/util/detect_existing_postgres_version.yml index e19dfbea..2d03cd7f 100644 --- a/roles/matrix-postgres/tasks/util/detect_existing_postgres_version.yml +++ b/roles/matrix-postgres/tasks/util/detect_existing_postgres_version.yml @@ -27,7 +27,7 @@ - name: Determine existing Postgres version (make sense of PG_VERSION file) ansible.builtin.set_fact: - matrix_postgres_detected_version: "{{ result_pg_version['content']|b64decode|replace('\n', '') }}" + matrix_postgres_detected_version: "{{ result_pg_version['content'] | b64decode | replace('\n', '') }}" when: matrix_postgres_detected_existing | bool - name: Determine corresponding Docker image to detected version (assume default of latest) diff --git a/roles/matrix-postgres/tasks/util/migrate_db_to_postgres.yml b/roles/matrix-postgres/tasks/util/migrate_db_to_postgres.yml index 469eb86a..83d0d4e9 100644 --- a/roles/matrix-postgres/tasks/util/migrate_db_to_postgres.yml +++ b/roles/matrix-postgres/tasks/util/migrate_db_to_postgres.yml @@ -131,6 +131,8 @@ {{ matrix_postgres_pgloader_docker_image }} -c 'pgloader {{ matrix_postgres_db_migration_request.pgloader_options | default([]) | join(' ') }} /in.db {{ matrix_postgres_db_migration_request.dst }}' + register: matrix_postgres_migrate_db_to_postgres_import_result + changed_when: matrix_postgres_migrate_db_to_postgres_import_result.rc == 0 - block: # We can't use `{{ role_path }}` here, neither with `import_tasks`, nor with `include_tasks`, @@ -152,12 +154,16 @@ {{ matrix_postgres_docker_image_to_use }} psql --host=matrix-postgres --dbname={{ matrix_postgres_db_migration_request.additional_psql_statements_db_name }} --command='{{ item }}' with_items: "{{ matrix_postgres_db_migration_request.additional_psql_statements_list }}" + register: matrix_postgres_migrate_db_to_postgres_additional_queries_result + changed_when: matrix_postgres_migrate_db_to_postgres_additional_queries_result.rc == 0 when: "matrix_postgres_db_migration_request.additional_psql_statements_list | default([])|length > 0" - name: Archive {{ matrix_postgres_db_migration_request.engine_old }} database ({{ matrix_postgres_db_migration_request.src }} -> {{ matrix_postgres_db_migration_request.src }}.backup) ansible.builtin.command: cmd: "mv {{ matrix_postgres_db_migration_request.src }} {{ matrix_postgres_db_migration_request.src }}.backup" + register: matrix_postgres_migrate_db_to_postgres_move_result + changed_when: matrix_postgres_migrate_db_to_postgres_move_result.rc == 0 - name: Inject result ansible.builtin.set_fact: diff --git a/roles/matrix-prometheus-postgres-exporter/defaults/main.yml b/roles/matrix-prometheus-postgres-exporter/defaults/main.yml index b7cd08b9..82a12f42 100644 --- a/roles/matrix-prometheus-postgres-exporter/defaults/main.yml +++ b/roles/matrix-prometheus-postgres-exporter/defaults/main.yml @@ -12,8 +12,8 @@ matrix_prometheus_postgres_exporter_docker_image_force_pull: "{{ matrix_promethe # A list of extra arguments to pass to the container matrix_prometheus_postgres_exporter_container_extra_arguments: ["-e PG_EXPORTER_AUTO_DISCOVER_DATABASES=true", - "-e PG_EXPORTER_WEB_LISTEN_ADDRESS=\":{{matrix_prometheus_postgres_exporter_port}}\"", - "-e DATA_SOURCE_NAME=\"postgresql://{{matrix_prometheus_postgres_exporter_database_username}}:{{matrix_prometheus_postgres_exporter_database_password}}@{{matrix_prometheus_postgres_exporter_database_hostname}}:5432/{{matrix_prometheus_postgres_exporter_database_name}}?sslmode=disable\""] + "-e PG_EXPORTER_WEB_LISTEN_ADDRESS=\":{{ matrix_prometheus_postgres_exporter_port }}\"", + "-e DATA_SOURCE_NAME=\"postgresql://{{ matrix_prometheus_postgres_exporter_database_username }}:{{ matrix_prometheus_postgres_exporter_database_password }}@{{ matrix_prometheus_postgres_exporter_database_hostname }}:5432/{{ matrix_prometheus_postgres_exporter_database_name }}?sslmode=disable\""] # List of systemd services that matrix-prometheus-postgres-exporter.service depends on matrix_prometheus_postgres_exporter_systemd_required_services_list: ['docker.service'] diff --git a/roles/matrix-prometheus/defaults/main.yml b/roles/matrix-prometheus/defaults/main.yml index aeb6ea6d..8f5c2148 100644 --- a/roles/matrix-prometheus/defaults/main.yml +++ b/roles/matrix-prometheus/defaults/main.yml @@ -79,4 +79,4 @@ matrix_prometheus_configuration_extension: "{{ matrix_prometheus_configuration_e # Holds the final configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_prometheus_configuration_yaml`. -matrix_prometheus_configuration: "{{ matrix_prometheus_configuration_yaml | from_yaml|combine(matrix_prometheus_configuration_extension, recursive=True) }}" +matrix_prometheus_configuration: "{{ matrix_prometheus_configuration_yaml | from_yaml | combine(matrix_prometheus_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-registration/defaults/main.yml b/roles/matrix-registration/defaults/main.yml index 060f51a2..1e53ae98 100644 --- a/roles/matrix-registration/defaults/main.yml +++ b/roles/matrix-registration/defaults/main.yml @@ -119,4 +119,4 @@ matrix_registration_configuration_extension: "{{ matrix_registration_configurati # Holds the final matrix-registration configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_registration_configuration_yaml`. -matrix_registration_configuration: "{{ matrix_registration_configuration_yaml | from_yaml|combine(matrix_registration_configuration_extension, recursive=True) }}" +matrix_registration_configuration: "{{ matrix_registration_configuration_yaml | from_yaml | combine(matrix_registration_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-sygnal/defaults/main.yml b/roles/matrix-sygnal/defaults/main.yml index 2c0f3a86..1268d602 100644 --- a/roles/matrix-sygnal/defaults/main.yml +++ b/roles/matrix-sygnal/defaults/main.yml @@ -73,4 +73,4 @@ matrix_sygnal_configuration_extension: "{{ matrix_sygnal_configuration_extension # Holds the final sygnal configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_sygnal_configuration_yaml`. -matrix_sygnal_configuration: "{{ matrix_sygnal_configuration_yaml | from_yaml|combine(matrix_sygnal_configuration_extension, recursive=True) }}" +matrix_sygnal_configuration: "{{ matrix_sygnal_configuration_yaml | from_yaml | combine(matrix_sygnal_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-synapse/defaults/main.yml b/roles/matrix-synapse/defaults/main.yml index 279730bf..87ef3d6a 100644 --- a/roles/matrix-synapse/defaults/main.yml +++ b/roles/matrix-synapse/defaults/main.yml @@ -523,7 +523,7 @@ matrix_synapse_ext_password_provider_shared_secret_auth_m_login_password_support matrix_synapse_ext_password_provider_shared_secret_auth_com_devture_shared_secret_auth_support_enabled: false matrix_synapse_ext_password_provider_shared_secret_config: "{{ matrix_synapse_ext_password_provider_shared_secret_config_yaml | from_yaml }}" matrix_synapse_ext_password_provider_shared_secret_config_yaml: | - shared_secret: {{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret|string | to_json }} + shared_secret: {{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret | string | to_json }} m_login_password_support_enabled: {{ matrix_synapse_ext_password_provider_shared_secret_auth_m_login_password_support_enabled | to_json }} com_devture_shared_secret_auth_support_enabled: {{ matrix_synapse_ext_password_provider_shared_secret_auth_com_devture_shared_secret_auth_support_enabled | to_json }} @@ -682,4 +682,4 @@ matrix_synapse_configuration_extension: "{{ matrix_synapse_configuration_extensi # Holds the final Synapse configuration (a combination of the default and its extension). # You most likely don't need to touch this variable. Instead, see `matrix_synapse_configuration_yaml`. -matrix_synapse_configuration: "{{ matrix_synapse_configuration_yaml | from_yaml|combine(matrix_synapse_configuration_extension, recursive=True) }}" +matrix_synapse_configuration: "{{ matrix_synapse_configuration_yaml | from_yaml | combine(matrix_synapse_configuration_extension, recursive=True) }}" diff --git a/roles/matrix-synapse/tasks/register_user.yml b/roles/matrix-synapse/tasks/register_user.yml index d7354d05..8c344b2d 100644 --- a/roles/matrix-synapse/tasks/register_user.yml +++ b/roles/matrix-synapse/tasks/register_user.yml @@ -29,3 +29,5 @@ - name: Register user ansible.builtin.command: "{{ matrix_local_bin_path }}/matrix-synapse-register-user {{ username|quote }} {{ password|quote }} {{ '1' if admin == 'yes' else '0' }}" + register: matrix_synapse_register_user_result + changed_when: matrix_synapse_register_user_result.rc == 0 diff --git a/roles/matrix-synapse/tasks/rust-synapse-compress-state/compress_room.yml b/roles/matrix-synapse/tasks/rust-synapse-compress-state/compress_room.yml index 30849ded..221a7570 100644 --- a/roles/matrix-synapse/tasks/rust-synapse-compress-state/compress_room.yml +++ b/roles/matrix-synapse/tasks/rust-synapse-compress-state/compress_room.yml @@ -21,6 +21,7 @@ async: "{{ matrix_synapse_rust_synapse_compress_state_compress_room_time }}" poll: 10 register: matrix_synapse_rust_synapse_compress_state_compress_room_command_result + changed_when: matrix_synapse_rust_synapse_compress_state_compress_room_command_result.rc == 0 - ansible.builtin.debug: var="matrix_synapse_rust_synapse_compress_state_compress_room_command_result" @@ -43,6 +44,7 @@ async: "{{ matrix_synapse_rust_synapse_compress_state_psql_import_time }}" poll: 10 register: matrix_synapse_rust_synapse_compress_state_psql_import_command_result + changed_when: matrix_synapse_rust_synapse_compress_state_psql_import_command_result.rc == 0 - name: Clean up ansible.builtin.file: diff --git a/roles/matrix-synapse/tasks/rust-synapse-compress-state/main.yml b/roles/matrix-synapse/tasks/rust-synapse-compress-state/main.yml index 097b816a..fcea8606 100644 --- a/roles/matrix-synapse/tasks/rust-synapse-compress-state/main.yml +++ b/roles/matrix-synapse/tasks/rust-synapse-compress-state/main.yml @@ -70,6 +70,7 @@ async: "{{ matrix_synapse_rust_synapse_compress_state_find_rooms_command_wait_time }}" poll: 10 register: matrix_synapse_rust_synapse_compress_state_find_rooms_command_result + changed_when: false # We expect the output to be like this: # diff --git a/roles/matrix-synapse/tasks/synapse/setup_install.yml b/roles/matrix-synapse/tasks/synapse/setup_install.yml index 51e22d75..e4ec0f67 100644 --- a/roles/matrix-synapse/tasks/synapse/setup_install.yml +++ b/roles/matrix-synapse/tasks/synapse/setup_install.yml @@ -32,6 +32,7 @@ - name: Check if Synapse Docker image exists ansible.builtin.command: "{{ matrix_host_command_docker }} images --quiet --filter 'reference={{ matrix_synapse_docker_image }}'" register: matrix_synapse_docker_image_check_result + changed_when: false # Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module, # because the latter does not support BuildKit. diff --git a/roles/matrix-synapse/tasks/synapse/workers/init.yml b/roles/matrix-synapse/tasks/synapse/workers/init.yml index 7c396422..4b007bc3 100644 --- a/roles/matrix-synapse/tasks/synapse/workers/init.yml +++ b/roles/matrix-synapse/tasks/synapse/workers/init.yml @@ -12,7 +12,7 @@ port: "{{ matrix_synapse_workers_generic_workers_port_range_start + item }}" metrics_port: "{{ matrix_synapse_workers_generic_workers_metrics_range_start + item }}" register: "matrix_synapse_workers_list_results_generic_workers" - loop: "{{ range(0, matrix_synapse_workers_generic_workers_count|int) | list }}" + loop: "{{ range(0, matrix_synapse_workers_generic_workers_count | int) | list }}" - name: Build federation sender workers ansible.builtin.set_fact: @@ -22,7 +22,7 @@ port: 0 metrics_port: "{{ matrix_synapse_workers_federation_sender_workers_metrics_range_start + item }}" register: "matrix_synapse_workers_list_results_federation_sender_workers" - loop: "{{ range(0, matrix_synapse_workers_federation_sender_workers_count|int) | list }}" + loop: "{{ range(0, matrix_synapse_workers_federation_sender_workers_count | int) | list }}" # This type of worker can only have a count of 1, at most - name: Build pusher workers @@ -33,7 +33,7 @@ port: 0 metrics_port: "{{ matrix_synapse_workers_pusher_workers_metrics_range_start + item }}" register: "matrix_synapse_workers_list_results_pusher_workers" - loop: "{{ range(0, matrix_synapse_workers_pusher_workers_count|int) | list }}" + loop: "{{ range(0, matrix_synapse_workers_pusher_workers_count | int) | list }}" # This type of worker can only have a count of 1, at most - name: Build appservice workers @@ -44,7 +44,7 @@ port: 0 metrics_port: "{{ matrix_synapse_workers_appservice_workers_metrics_range_start + item }}" register: "matrix_synapse_workers_list_results_appservice_workers" - loop: "{{ range(0, matrix_synapse_workers_appservice_workers_count|int) | list }}" + loop: "{{ range(0, matrix_synapse_workers_appservice_workers_count | int) | list }}" - name: Build media_repository workers ansible.builtin.set_fact: @@ -54,7 +54,7 @@ port: "{{ matrix_synapse_workers_media_repository_workers_port_range_start + item }}" metrics_port: "{{ matrix_synapse_workers_media_repository_workers_metrics_range_start + item }}" register: "matrix_synapse_workers_list_results_media_repository_workers" - loop: "{{ range(0, matrix_synapse_workers_media_repository_workers_count|int) | list }}" + loop: "{{ range(0, matrix_synapse_workers_media_repository_workers_count | int) | list }}" - name: Build frontend_proxy workers ansible.builtin.set_fact: @@ -64,7 +64,7 @@ port: "{{ matrix_synapse_workers_frontend_proxy_workers_port_range_start + item }}" metrics_port: "{{ matrix_synapse_workers_frontend_proxy_workers_metrics_range_start + item }}" register: "matrix_synapse_workers_list_results_frontend_proxy_workers" - loop: "{{ range(0, matrix_synapse_workers_frontend_proxy_workers_count|int) | list }}" + loop: "{{ range(0, matrix_synapse_workers_frontend_proxy_workers_count | int) | list }}" - ansible.builtin.set_fact: matrix_synapse_dynamic_workers_list: "{{ matrix_synapse_dynamic_workers_list | default([]) + [item.ansible_facts.worker] }}" diff --git a/roles/matrix-synapse/tasks/synapse/workers/setup_uninstall.yml b/roles/matrix-synapse/tasks/synapse/workers/setup_uninstall.yml index f79a4115..98c81a2e 100644 --- a/roles/matrix-synapse/tasks/synapse/workers/setup_uninstall.yml +++ b/roles/matrix-synapse/tasks/synapse/workers/setup_uninstall.yml @@ -7,7 +7,7 @@ ansible.builtin.service: name: "{{ item.key }}" state: stopped - with_dict: "{{ ansible_facts.services | default({})|dict2items|selectattr('key', 'match', 'matrix-synapse-worker-.+\\.service')|list|items2dict }}" + with_dict: "{{ ansible_facts.services | default({}) | dict2items | selectattr('key', 'match', 'matrix-synapse-worker-.+\\.service') | list | items2dict }}" when: "item.value['status'] != 'not-found'" # see https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1461 - name: Find worker configs to be cleaned diff --git a/roles/matrix-synapse/tasks/update_user_password.yml b/roles/matrix-synapse/tasks/update_user_password.yml index 1ae3183e..586bf51b 100644 --- a/roles/matrix-synapse/tasks/update_user_password.yml +++ b/roles/matrix-synapse/tasks/update_user_password.yml @@ -38,6 +38,9 @@ - name: Generate password hash ansible.builtin.shell: "{{ matrix_host_command_docker }} exec matrix-synapse /usr/local/bin/hash_password -c /data/homeserver.yaml -p {{ password|quote }}" register: password_hash + changed_when: false - name: Update user password hash ansible.builtin.command: "{{ matrix_local_bin_path }}/matrix-postgres-update-user-password-hash {{ username|quote }} {{ password_hash.stdout|quote }}" + register: matrix_synapse_update_user_password_result + changed_when: matrix_synapse_update_user_password_result.rc == 0 diff --git a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 index c2364650..87cedb40 100644 --- a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -352,13 +352,13 @@ worker_app: synapse.app.homeserver # thx https://oznetnerd.com/2017/04/18/jinja2-selectattr-filter/ # reduce the main worker's offerings to core homeserver business -{% if matrix_synapse_workers_enabled_list|selectattr('type', 'equalto', 'federation_sender')|list %} +{% if matrix_synapse_workers_enabled_list | selectattr('type', 'equalto', 'federation_sender') | list %} send_federation: false {% endif %} -{% if matrix_synapse_workers_enabled_list|selectattr('type', 'equalto', 'media_repository')|list %} +{% if matrix_synapse_workers_enabled_list | selectattr('type', 'equalto', 'media_repository') | list %} enable_media_repo: false {% endif %} -{% if matrix_synapse_workers_enabled_list|selectattr('type', 'equalto', 'pusher')|list %} +{% if matrix_synapse_workers_enabled_list | selectattr('type', 'equalto', 'pusher') | list %} start_pushers: false {% endif %} @@ -870,8 +870,8 @@ database: name: "psycopg2" txn_limit: {{ matrix_synapse_database_txn_limit }} args: - user: {{ matrix_synapse_database_user|string|to_json }} - password: {{ matrix_synapse_database_password|string|to_json }} + user: {{ matrix_synapse_database_user | string|to_json }} + password: {{ matrix_synapse_database_password | string|to_json }} database: "{{ matrix_synapse_database_database }}" host: "{{ matrix_synapse_database_host }}" port: {{ matrix_synapse_database_port }} @@ -1256,7 +1256,7 @@ turn_uris: {{ matrix_synapse_turn_uris|to_json }} # The shared secret used to compute passwords for the TURN server # -turn_shared_secret: {{ matrix_synapse_turn_shared_secret|string|to_json }} +turn_shared_secret: {{ matrix_synapse_turn_shared_secret | string|to_json }} # The Username and password if the TURN server needs them and # does not use a token @@ -1393,7 +1393,7 @@ registration_requires_token: {{ matrix_synapse_registration_requires_token|to_js # If set, allows registration of standard or admin accounts by anyone who # has the shared secret, even if registration is otherwise disabled. # -registration_shared_secret: {{ matrix_synapse_registration_shared_secret|string|to_json }} +registration_shared_secret: {{ matrix_synapse_registration_shared_secret | string|to_json }} # Set the number of bcrypt rounds used to generate password hash. # Larger numbers increase the work factor needed to generate the hash. @@ -1657,13 +1657,13 @@ app_service_config_files: {{ matrix_synapse_app_service_config_files|to_json }} # the registration_shared_secret is used, if one is given; otherwise, # a secret key is derived from the signing key. # -macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key|string|to_json }} +macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key | string|to_json }} # a secret which is used to calculate HMACs for form values, to stop # falsification of values. Must be specified for the User Consent # forms to work. # -form_secret: {{ matrix_synapse_form_secret|string|to_json }} +form_secret: {{ matrix_synapse_form_secret | string|to_json }} ## Signing Keys ## @@ -2263,7 +2263,7 @@ password_config: # Uncomment and change to a secret random string for extra security. # DO NOT CHANGE THIS AFTER INITIAL SETUP! # - pepper: {{ matrix_synapse_password_config_pepper|string|to_json }} + pepper: {{ matrix_synapse_password_config_pepper | string|to_json }} # Define and enforce a password policy. Each parameter is optional. # This is an implementation of MSC2000. @@ -2330,7 +2330,7 @@ email: # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'. # #smtp_host: mail.server - smtp_host: {{ matrix_synapse_email_smtp_host|string|to_json }} + smtp_host: {{ matrix_synapse_email_smtp_host | string|to_json }} # The port on the mail server for outgoing SMTP. Defaults to 25. # @@ -2340,8 +2340,8 @@ email: # Username/password for authentication to the SMTP server. By default, no # authentication is attempted. {% if matrix_synapse_email_smtp_user %} - smtp_user: {{ matrix_synapse_email_smtp_user|string|to_json }} - smtp_pass: {{ matrix_synapse_email_smtp_pass|string|to_json }} + smtp_user: {{ matrix_synapse_email_smtp_user | string|to_json }} + smtp_pass: {{ matrix_synapse_email_smtp_pass | string|to_json }} {% endif %} # Uncomment the following to require TLS transport security for SMTP. @@ -2371,7 +2371,7 @@ email: # trailing 's'. # #notif_from: "Your Friendly %(app)s homeserver " - notif_from: {{ matrix_synapse_email_notif_from|string|to_json }} + notif_from: {{ matrix_synapse_email_notif_from | string|to_json }} # app_name defines the default value for '%(app)s' in notif_from and email # subjects. It defaults to 'Matrix'. @@ -2398,7 +2398,7 @@ email: # supported for backwards-compatibility but is now deprecated.) # #client_base_url: "http://localhost/riot" - client_base_url: {{ matrix_synapse_email_client_base_url|string|to_json }} + client_base_url: {{ matrix_synapse_email_client_base_url | string|to_json }} # Configure the time that a validation email will expire after sending. # Defaults to 1h. @@ -2409,7 +2409,7 @@ email: # to the identity server as the org.matrix.web_client_location key. Defaults # to unset, giving no guidance to the identity server. # - invite_client_location: {{ matrix_synapse_email_invite_client_location|string|to_json }} + invite_client_location: {{ matrix_synapse_email_invite_client_location | string|to_json }} # Subjects to use when sending emails from Synapse. # @@ -2510,7 +2510,7 @@ password_providers: {% if matrix_synapse_ext_password_provider_rest_auth_enabled %} - module: "rest_auth_provider.RestAuthProvider" config: - endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint|string|to_json }} + endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint | string|to_json }} policy: registration: username: @@ -2525,20 +2525,20 @@ password_providers: - module: "ldap_auth_provider.LdapAuthProvider" config: enabled: true - uri: {{ matrix_synapse_ext_password_provider_ldap_uri|string|to_json }} + uri: {{ matrix_synapse_ext_password_provider_ldap_uri | string|to_json }} start_tls: {{ matrix_synapse_ext_password_provider_ldap_start_tls|to_json }} - base: {{ matrix_synapse_ext_password_provider_ldap_base|string|to_json }} + base: {{ matrix_synapse_ext_password_provider_ldap_base | string|to_json }} active_directory: {{ matrix_synapse_ext_password_provider_ldap_active_directory|to_json }} - default_domain: {{ matrix_synapse_ext_password_provider_ldap_default_domain|string|to_json }} + default_domain: {{ matrix_synapse_ext_password_provider_ldap_default_domain | string|to_json }} attributes: - uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid|string|to_json }} - mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail|string|to_json }} - name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name|string|to_json }} + uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid | string|to_json }} + mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail | string|to_json }} + name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name | string|to_json }} {% if matrix_synapse_ext_password_provider_ldap_bind_dn %} - bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn|string|to_json }} - bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password|string|to_json }} + bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn | string|to_json }} + bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password | string|to_json }} {% endif %} - filter: {{ matrix_synapse_ext_password_provider_ldap_filter|string|to_json }} + filter: {{ matrix_synapse_ext_password_provider_ldap_filter | string|to_json }} {% endif %} {% endif %}