feat: drop blanket recreates, ACME-DNS knobs, notify_push override
- Drop `recreate: always` from collabora/drawio/homarr/opencloud/traefik handlers and the authentik_outpost_ldap start task. `up -d` with `state: present` already recreates exactly the services whose compose definition changed; the blanket recreate was forcing restarts even when nothing relevant moved. - Rewrite the `*_domains` Traefik Host loop to the `Host(\`a\`) || Host(\`b\`)` form across authentik/collabora/garage/nextcloud so the rule still matches when traefik can't normalize the comma-form into the same canonical shape. - Traefik: add `traefik_acme_tcp_only` (sets LEGO_EXPERIMENTAL_DNS_TCP_ONLY) and `traefik_acme_disable_ans_checks` (disables lego's authoritative-NS propagation check) for environments where the DNS path between the traefik container and the zone's nameservers is constrained. - Traefik DMZ collector: two-step merge so a `traefik_dmz_exposed_services` entry that sets its own `backend_host` wins over the host fallback; lets a route target an internal FQDN covered by the backend cert's SANs instead of the raw IP. - Nextcloud: add `nextcloud_notify_push_domain` override for the `occ notify_push:setup` call so the setup check can hit an internal FQDN instead of hairpinning through the DMZ. Push router now matches every entry in `nextcloud_domains`. - Nextcloud: also %2F-escape slashes in the postgres user/password inside the notify_push DATABASE_URL.
This commit is contained in:
parent
36e3a4b688
commit
02d45026a5
15 changed files with 49 additions and 13 deletions
|
|
@ -33,6 +33,18 @@ traefik_acme_tsig_secret: "" # TSIG secret
|
|||
traefik_acme_propagation_timeout: "120"
|
||||
traefik_acme_polling_interval: "2"
|
||||
traefik_acme_ttl: "60"
|
||||
# Force lego's DNS lookups (SOA resolution, propagation checks) onto
|
||||
# TCP instead of UDP. Useful when container egress can reach the
|
||||
# nameserver on TCP/53 but UDP/53 is blocked or unreliable. Sets the
|
||||
# upstream env var LEGO_EXPERIMENTAL_DNS_TCP_ONLY=true on the
|
||||
# traefik container.
|
||||
traefik_acme_tcp_only: false
|
||||
# Disable lego's propagation check against the zone's authoritative
|
||||
# nameservers. Use when the SOA-listed NS hostname resolves to an
|
||||
# address that isn't reachable from this traefik host (e.g. a DMZ
|
||||
# box that can only see the internal NS IP, not the public one).
|
||||
# lego still polls via the configured `resolvers:` list.
|
||||
traefik_acme_disable_ans_checks: false
|
||||
|
||||
# Self-signed certificate configuration (for vagrant/testing)
|
||||
traefik_selfsigned_cert_dir: "{{ docker_volume_dir }}/certs"
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
- name: restart traefik
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ docker_compose_dir }}"
|
||||
state: restarted
|
||||
state: present
|
||||
|
|
|
|||
|
|
@ -9,7 +9,18 @@
|
|||
|
||||
- name: Build service registry from backend servers (DMZ mode)
|
||||
set_fact:
|
||||
proxied_services: "{{ proxied_services | default([]) + hostvars[item].traefik_dmz_exposed_services | default([]) | map('combine', {'backend_host': hostvars[item].ansible_host | default(item)}) | list }}"
|
||||
# Two-step merge so a service entry's own `backend_host` wins:
|
||||
# entries that set it pass through unchanged, entries that don't
|
||||
# get the backend host's ansible_host as fallback. The override
|
||||
# lets a route target an internal FQDN covered by the backend
|
||||
# cert's SANs instead of the raw IP (which would fail backend
|
||||
# TLS verification at the proxy hop).
|
||||
proxied_services: >-
|
||||
{{
|
||||
proxied_services | default([])
|
||||
+ (hostvars[item].traefik_dmz_exposed_services | default([]) | selectattr('backend_host', 'defined') | list)
|
||||
+ (hostvars[item].traefik_dmz_exposed_services | default([]) | rejectattr('backend_host', 'defined') | map('combine', {'backend_host': hostvars[item].ansible_host | default(item)}) | list)
|
||||
}}
|
||||
loop: "{{ _backend_servers | default([]) }}"
|
||||
when: traefik_mode == 'dmz'
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ services:
|
|||
RFC2136_PROPAGATION_TIMEOUT: "{{ traefik_acme_propagation_timeout }}"
|
||||
RFC2136_POLLING_INTERVAL: "{{ traefik_acme_polling_interval }}"
|
||||
RFC2136_TTL: "{{ traefik_acme_ttl }}"
|
||||
{% if traefik_acme_tcp_only | default(false) %}
|
||||
LEGO_EXPERIMENTAL_DNS_TCP_ONLY: "true"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
ports:
|
||||
- "80:80"
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ certificatesResolvers:
|
|||
provider: rfc2136
|
||||
resolvers:
|
||||
- "{{ traefik_acme_dns_nameserver }}"
|
||||
{% if traefik_acme_disable_ans_checks | default(false) %}
|
||||
propagation:
|
||||
disableANSChecks: true
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if traefik_use_ssl %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue