From 05b79057aa62450c8638831e8d4a4a33138f11b8 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 5 Sep 2024 14:58:43 +0300 Subject: [PATCH] Do not add quotes around already-backtick-quoted Traefik rules As reported in https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3451#issuecomment-2331316593 Likely the solution to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3451 --- roles/custom/matrix-media-repo/defaults/main.yml | 16 ++++++++-------- .../defaults/main.yml | 2 +- .../matrix-synapse-admin/defaults/main.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/custom/matrix-media-repo/defaults/main.yml b/roles/custom/matrix-media-repo/defaults/main.yml index a8231beef..45bc1b5cd 100755 --- a/roles/custom/matrix-media-repo/defaults/main.yml +++ b/roles/custom/matrix-media-repo/defaults/main.yml @@ -74,7 +74,7 @@ matrix_media_repo_container_labels_traefik_entrypoints: web-secure # These are being superseded by `/_matrix/client/VERSION/media` endpoints - see `matrix_media_repo_container_labels_traefik_client_matrix_client_media_*`. matrix_media_repo_container_labels_traefik_media_enabled: true matrix_media_repo_container_labels_traefik_media_path_prefix: "/_matrix/media" -matrix_media_repo_container_labels_traefik_media_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_media_path_prefix | quote }}`)" +matrix_media_repo_container_labels_traefik_media_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_media_path_prefix }}`)" matrix_media_repo_container_labels_traefik_media_priority: 0 matrix_media_repo_container_labels_traefik_media_entrypoints: "{{ matrix_media_repo_container_labels_traefik_entrypoints }}" matrix_media_repo_container_labels_traefik_media_tls: "{{ matrix_media_repo_container_labels_traefik_media_entrypoints != 'web' }}" @@ -84,7 +84,7 @@ matrix_media_repo_container_labels_traefik_media_tls_certResolver: default # no # See: https://github.com/matrix-org/matrix-spec-proposals/pull/3916 matrix_media_repo_container_labels_traefik_client_matrix_client_media_enabled: true matrix_media_repo_container_labels_traefik_client_matrix_client_media_path_regexp: "/_matrix/client/(?P(v1))/media" -matrix_media_repo_container_labels_traefik_client_matrix_client_media_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathRegexp(`{{ matrix_media_repo_container_labels_traefik_client_matrix_client_media_path_regexp | quote }}`)" +matrix_media_repo_container_labels_traefik_client_matrix_client_media_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathRegexp(`{{ matrix_media_repo_container_labels_traefik_client_matrix_client_media_path_regexp }}`)" matrix_media_repo_container_labels_traefik_client_matrix_client_media_priority: 0 matrix_media_repo_container_labels_traefik_client_matrix_client_media_entrypoints: "{{ matrix_media_repo_container_labels_traefik_entrypoints }}" matrix_media_repo_container_labels_traefik_client_matrix_client_media_tls: "{{ matrix_media_repo_container_labels_traefik_client_matrix_client_media_entrypoints != 'web' }}" @@ -95,7 +95,7 @@ matrix_media_repo_container_labels_traefik_client_matrix_client_media_tls_certRe # These are being superseded by `/_matrix/client/VERSION/media` endpoints - see `matrix_media_repo_container_labels_traefik_internal_matrix_client_media_*`. matrix_media_repo_container_labels_traefik_internal_media_enabled: false matrix_media_repo_container_labels_traefik_internal_media_path_prefix: "{{ matrix_media_repo_container_labels_traefik_media_path_prefix }}" -matrix_media_repo_container_labels_traefik_internal_media_rule: "PathPrefix(`{{ matrix_media_repo_container_labels_traefik_internal_media_path_prefix | quote }}`)" +matrix_media_repo_container_labels_traefik_internal_media_rule: "PathPrefix(`{{ matrix_media_repo_container_labels_traefik_internal_media_path_prefix }}`)" matrix_media_repo_container_labels_traefik_internal_media_priority: "{{ matrix_media_repo_container_labels_traefik_media_priority }}" matrix_media_repo_container_labels_traefik_internal_media_entrypoints: "" @@ -103,7 +103,7 @@ matrix_media_repo_container_labels_traefik_internal_media_entrypoints: "" # See: https://github.com/matrix-org/matrix-spec-proposals/pull/3916 matrix_media_repo_container_labels_traefik_internal_matrix_client_media_enabled: false matrix_media_repo_container_labels_traefik_internal_matrix_client_media_path_regexp: "{{ matrix_media_repo_container_labels_traefik_client_matrix_client_media_path_regexp }}" -matrix_media_repo_container_labels_traefik_internal_matrix_client_media_rule: "PathRegexp(`{{ matrix_media_repo_container_labels_traefik_internal_matrix_client_media_path_regexp | quote }}`)" +matrix_media_repo_container_labels_traefik_internal_matrix_client_media_rule: "PathRegexp(`{{ matrix_media_repo_container_labels_traefik_internal_matrix_client_media_path_regexp }}`)" matrix_media_repo_container_labels_traefik_internal_matrix_client_media_priority: "{{ matrix_media_repo_container_labels_traefik_client_matrix_client_media_priority }}" matrix_media_repo_container_labels_traefik_internal_matrix_client_media_entrypoints: "" @@ -133,7 +133,7 @@ matrix_media_repo_container_labels_traefik_admin_tls_certResolver: default # no # - /_matrix/client/unstable/io.t2bot.media matrix_media_repo_container_labels_traefik_t2bot_enabled: true matrix_media_repo_container_labels_traefik_t2bot_path_prefix: "/_matrix/client/unstable/io.t2bot.media" -matrix_media_repo_container_labels_traefik_t2bot_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_t2bot_path_prefix | quote }}`)" +matrix_media_repo_container_labels_traefik_t2bot_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_t2bot_path_prefix }}`)" matrix_media_repo_container_labels_traefik_t2bot_priority: 0 matrix_media_repo_container_labels_traefik_t2bot_entrypoints: "{{ matrix_media_repo_container_labels_traefik_entrypoints }}" matrix_media_repo_container_labels_traefik_t2bot_tls: "{{ matrix_media_repo_container_labels_traefik_t2bot_entrypoints != 'web' }}" @@ -155,7 +155,7 @@ matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_users: # These are being superseded by `/_matrix/federation/VERSION/media` endpoints - see `matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_*`. matrix_media_repo_container_labels_traefik_media_federation_enabled: true matrix_media_repo_container_labels_traefik_media_federation_path_prefix: "/_matrix/media" -matrix_media_repo_container_labels_traefik_media_federation_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_media_path_prefix | quote }}`)" +matrix_media_repo_container_labels_traefik_media_federation_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_media_path_prefix }}`)" matrix_media_repo_container_labels_traefik_media_federation_priority: 0 matrix_media_repo_container_labels_traefik_media_federation_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}" matrix_media_repo_container_labels_traefik_media_federation_tls: "{{ matrix_media_repo_container_labels_traefik_media_entrypoints != 'web' }}" @@ -165,7 +165,7 @@ matrix_media_repo_container_labels_traefik_media_federation_tls_certResolver: de # See: https://github.com/matrix-org/matrix-spec-proposals/pull/3916 matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_enabled: true matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_path_regexp: "/_matrix/federation/(?P(v1))/media" -matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathRegexp(`{{ matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_path_regexp | quote }}`)" +matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathRegexp(`{{ matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_path_regexp }}`)" matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_priority: 0 matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}" matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_tls: "{{ matrix_media_repo_container_labels_traefik_federation_matrix_federation_media_entrypoints != 'web' }}" @@ -197,7 +197,7 @@ matrix_media_repo_container_labels_traefik_admin_federation_tls_certResolver: de # - /_matrix/client/unstable/io.t2bot.media matrix_media_repo_container_labels_traefik_t2bot_federation_enabled: true matrix_media_repo_container_labels_traefik_t2bot_federation_path_prefix: "/_matrix/client/unstable/io.t2bot.media" -matrix_media_repo_container_labels_traefik_t2bot_federation_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_t2bot_path_prefix | quote }}`)" +matrix_media_repo_container_labels_traefik_t2bot_federation_rule: "Host(`{{ matrix_server_fqn_matrix }}`) && PathPrefix(`{{ matrix_media_repo_container_labels_traefik_t2bot_path_prefix }}`)" matrix_media_repo_container_labels_traefik_t2bot_federation_priority: 0 matrix_media_repo_container_labels_traefik_t2bot_federation_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}" matrix_media_repo_container_labels_traefik_t2bot_federation_tls: "{{ matrix_media_repo_container_labels_traefik_t2bot_entrypoints != 'web' }}" diff --git a/roles/custom/matrix-prometheus-nginxlog-exporter/defaults/main.yml b/roles/custom/matrix-prometheus-nginxlog-exporter/defaults/main.yml index a22787961..c8699eab8 100644 --- a/roles/custom/matrix-prometheus-nginxlog-exporter/defaults/main.yml +++ b/roles/custom/matrix-prometheus-nginxlog-exporter/defaults/main.yml @@ -50,7 +50,7 @@ matrix_prometheus_nginxlog_exporter_container_labels_traefik_docker_network: "{{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_hostname: "{{ matrix_prometheus_nginxlog_exporter_hostname }}" # The path prefix must either be `/` or not end with a slash (e.g. `/metrics`). matrix_prometheus_nginxlog_exporter_container_labels_traefik_path_prefix: "{{ matrix_prometheus_nginxlog_exporter_path_prefix }}" -matrix_prometheus_nginxlog_exporter_container_labels_traefik_rule: "Host(`{{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_hostname }}`) && PathPrefix(`{{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_path_prefix | quote }}`)" +matrix_prometheus_nginxlog_exporter_container_labels_traefik_rule: "Host(`{{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_hostname }}`) && PathPrefix(`{{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_path_prefix }}`)" matrix_prometheus_nginxlog_exporter_container_labels_traefik_entrypoints: web-secure matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls: "{{ matrix_prometheus_nginxlog_exporter_container_labels_traefik_entrypoints != 'web' }}" matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls_certResolver: default # noqa var-naming diff --git a/roles/custom/matrix-synapse-admin/defaults/main.yml b/roles/custom/matrix-synapse-admin/defaults/main.yml index 2c978601b..a14770dce 100644 --- a/roles/custom/matrix-synapse-admin/defaults/main.yml +++ b/roles/custom/matrix-synapse-admin/defaults/main.yml @@ -43,7 +43,7 @@ matrix_synapse_admin_container_labels_traefik_docker_network: "{{ matrix_synapse matrix_synapse_admin_container_labels_traefik_hostname: "{{ matrix_synapse_admin_hostname }}" # The path prefix must either be `/` or not end with a slash (e.g. `/synapse-admin`). matrix_synapse_admin_container_labels_traefik_path_prefix: "{{ matrix_synapse_admin_path_prefix }}" -matrix_synapse_admin_container_labels_traefik_rule: "Host(`{{ matrix_synapse_admin_container_labels_traefik_hostname }}`){% if matrix_synapse_admin_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_synapse_admin_container_labels_traefik_path_prefix | quote }}`){% endif %}" +matrix_synapse_admin_container_labels_traefik_rule: "Host(`{{ matrix_synapse_admin_container_labels_traefik_hostname }}`){% if matrix_synapse_admin_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_synapse_admin_container_labels_traefik_path_prefix }}`){% endif %}" matrix_synapse_admin_container_labels_traefik_priority: 0 matrix_synapse_admin_container_labels_traefik_entrypoints: web-secure matrix_synapse_admin_container_labels_traefik_tls: "{{ matrix_synapse_admin_container_labels_traefik_entrypoints != 'web' }}"