diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 3ec4536c5..035de83b3 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -3607,14 +3607,11 @@ matrix_client_element_enabled: true matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" -# Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network. -# If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose -# the Element HTTP port to the local host. matrix_client_element_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8765') if matrix_playbook_service_host_bind_interface_prefix else '' }}" -matrix_client_element_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-client-element' }}" +matrix_client_element_container_network: "{{ matrix_addons_container_network }}" -matrix_client_element_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}" +matrix_client_element_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_element_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}" matrix_client_element_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}" matrix_client_element_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}" @@ -3661,14 +3658,11 @@ matrix_client_hydrogen_enabled: false matrix_client_hydrogen_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}" -# Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network. -# If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose -# the HTTP port to the local host. matrix_client_hydrogen_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8768') if matrix_playbook_service_host_bind_interface_prefix else '' }}" -matrix_client_hydrogen_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-client-hydrogen' }}" +matrix_client_hydrogen_container_network: "{{ matrix_addons_container_network }}" -matrix_client_hydrogen_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}" +matrix_client_hydrogen_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_hydrogen_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}" matrix_client_hydrogen_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}" matrix_client_hydrogen_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}" @@ -3695,14 +3689,11 @@ matrix_client_cinny_enabled: false matrix_client_cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" -# Normally, matrix-nginx-proxy is enabled and nginx can reach Cinny over the container network. -# If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose -# the HTTP port to the local host. matrix_client_cinny_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8080') if matrix_playbook_service_host_bind_interface_prefix else '' }}" -matrix_client_cinny_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-client-cinny' }}" +matrix_client_cinny_container_network: "{{ matrix_addons_container_network }}" -matrix_client_cinny_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}" +matrix_client_cinny_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_cinny_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}" matrix_client_cinny_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}" matrix_client_cinny_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}" @@ -3729,14 +3720,11 @@ matrix_client_schildichat_enabled: false matrix_client_schildichat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" -# Normally, matrix-nginx-proxy is enabled and nginx can reach schildichat over the container network. -# If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose -# the schildichat HTTP port to the local host. matrix_client_schildichat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8765') if matrix_playbook_service_host_bind_interface_prefix else '' }}" -matrix_client_schildichat_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-client-schildichat' }}" +matrix_client_schildichat_container_network: "{{ matrix_addons_container_network }}" -matrix_client_schildichat_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}" +matrix_client_schildichat_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_schildichat_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}" matrix_client_schildichat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}" matrix_client_schildichat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}" diff --git a/roles/custom/matrix-client-cinny/defaults/main.yml b/roles/custom/matrix-client-cinny/defaults/main.yml index 5ab1bd381..1e1acb3a0 100644 --- a/roles/custom/matrix-client-cinny/defaults/main.yml +++ b/roles/custom/matrix-client-cinny/defaults/main.yml @@ -16,7 +16,7 @@ matrix_client_cinny_data_path: "{{ matrix_base_data_path }}/client-cinny" matrix_client_cinny_docker_src_files_path: "{{ matrix_client_cinny_data_path }}/docker-src" # The base container network -matrix_client_cinny_container_network: matrix-client-cinny +matrix_client_cinny_container_network: '' # A list of additional container networks that the container would be connected to. # The role does not create these networks, so make sure they already exist. diff --git a/roles/custom/matrix-client-cinny/tasks/validate_config.yml b/roles/custom/matrix-client-cinny/tasks/validate_config.yml index 333872097..a6d7a9958 100644 --- a/roles/custom/matrix-client-cinny/tasks/validate_config.yml +++ b/roles/custom/matrix-client-cinny/tasks/validate_config.yml @@ -5,7 +5,8 @@ You need to define a required configuration setting (`{{ item }}`) to use Cinny. when: "vars[item] == '' or vars[item] is none" with_items: - - "matrix_client_cinny_default_hs_url" + - matrix_client_cinny_default_hs_url + - matrix_client_cinny_container_network - when: matrix_client_cinny_container_labels_traefik_enabled | bool block: diff --git a/roles/custom/matrix-client-element/defaults/main.yml b/roles/custom/matrix-client-element/defaults/main.yml index 2e094c701..9e793afe2 100644 --- a/roles/custom/matrix-client-element/defaults/main.yml +++ b/roles/custom/matrix-client-element/defaults/main.yml @@ -21,7 +21,7 @@ matrix_client_element_data_path: "{{ matrix_base_data_path }}/client-element" matrix_client_element_docker_src_files_path: "{{ matrix_client_element_data_path }}/docker-src" # The base container network -matrix_client_element_container_network: matrix-client-element +matrix_client_element_container_network: '' # A list of additional container networks that the container would be connected to. # The role does not create these networks, so make sure they already exist. diff --git a/roles/custom/matrix-client-element/tasks/validate_config.yml b/roles/custom/matrix-client-element/tasks/validate_config.yml index dc6c9f5ad..e9d9b4105 100644 --- a/roles/custom/matrix-client-element/tasks/validate_config.yml +++ b/roles/custom/matrix-client-element/tasks/validate_config.yml @@ -6,7 +6,8 @@ You need to define a required configuration setting (`{{ item }}`) for using Element. when: "vars[item] == ''" with_items: - - "matrix_client_element_default_hs_url" + - matrix_client_element_default_hs_url + - matrix_client_element_container_network - name: Fail if Element location sharing enabled, but no tile server defined ansible.builtin.fail: diff --git a/roles/custom/matrix-client-hydrogen/defaults/main.yml b/roles/custom/matrix-client-hydrogen/defaults/main.yml index fea1cfe33..e2aa0ef16 100644 --- a/roles/custom/matrix-client-hydrogen/defaults/main.yml +++ b/roles/custom/matrix-client-hydrogen/defaults/main.yml @@ -16,7 +16,7 @@ matrix_client_hydrogen_data_path: "{{ matrix_base_data_path }}/client-hydrogen" matrix_client_hydrogen_docker_src_files_path: "{{ matrix_client_hydrogen_data_path }}/docker-src" # The base container network -matrix_client_hydrogen_container_network: matrix-client-hydrogen +matrix_client_hydrogen_container_network: '' # A list of additional container networks that the container would be connected to. # The role does not create these networks, so make sure they already exist. diff --git a/roles/custom/matrix-client-hydrogen/tasks/validate_config.yml b/roles/custom/matrix-client-hydrogen/tasks/validate_config.yml index dd880ddb2..73452f831 100644 --- a/roles/custom/matrix-client-hydrogen/tasks/validate_config.yml +++ b/roles/custom/matrix-client-hydrogen/tasks/validate_config.yml @@ -6,7 +6,8 @@ You need to define a required configuration setting (`{{ item }}`) to use Hydrogen. when: "(vars[item] == '' or vars[item] is none) and matrix_client_hydrogen_container_image_self_build | bool" with_items: - - "matrix_client_hydrogen_default_hs_url" + - matrix_client_hydrogen_default_hs_url + - matrix_client_hydrogen_container_network - when: matrix_client_hydrogen_container_labels_traefik_enabled | bool block: diff --git a/roles/custom/matrix-client-schildichat/defaults/main.yml b/roles/custom/matrix-client-schildichat/defaults/main.yml index 73d6227da..a686930ad 100644 --- a/roles/custom/matrix-client-schildichat/defaults/main.yml +++ b/roles/custom/matrix-client-schildichat/defaults/main.yml @@ -15,7 +15,7 @@ matrix_client_schildichat_data_path: "{{ matrix_base_data_path }}/client-schildi matrix_client_schildichat_docker_src_files_path: "{{ matrix_client_schildichat_data_path }}/docker-src" # The base container network -matrix_client_schildichat_container_network: matrix-client-schildichat +matrix_client_schildichat_container_network: '' # A list of additional container networks that the container would be connected to. # The role does not create these networks, so make sure they already exist. diff --git a/roles/custom/matrix-client-schildichat/tasks/validate_config.yml b/roles/custom/matrix-client-schildichat/tasks/validate_config.yml index f01626453..966a74931 100644 --- a/roles/custom/matrix-client-schildichat/tasks/validate_config.yml +++ b/roles/custom/matrix-client-schildichat/tasks/validate_config.yml @@ -6,7 +6,8 @@ You need to define a required configuration setting (`{{ item }}`) for using schildichat. when: "vars[item] == ''" with_items: - - "matrix_client_schildichat_default_hs_url" + - matrix_client_schildichat_default_hs_url + - matrix_client_schildichat_container_network - name: Fail if schildichat location sharing enabled, but no tile server defined ansible.builtin.fail: