From aa88429c25b145ab53669e2d56eb43736ba32aa9 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 29 Oct 2026 08:26:22 +0100 Subject: [PATCH] fix(sys-stk-front-proxy): probe the queued vhosts only on the OpenResty host sys-stk-full includes the front proxy with run_once and delegate_to, so every set_fact inside is broadcast to all hosts of the play. A worker context queued the clearnet URL (its group_names lack svc-net-tor) over the manager's onion queue, and the deferred probe then ran on every host: workers and the NFS server, which serve nothing and cannot resolve .onion, answered -1 and failed the swarm deploy with 'OpenResty does not serve ... even after a restart' after a needless OpenResty restart. Only the stack host now queues a vhost, and only the first host of svc-prx-openresty probes the queue; an empty queue skips before the group is read. Co-Authored-By: Claude Opus 5.5 (1M context) --- roles/sys-stk-front-proxy/tasks/deferred_probe.yml | 4 +++- roles/sys-stk-front-proxy/tasks/main.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/sys-stk-front-proxy/tasks/deferred_probe.yml b/roles/sys-stk-front-proxy/tasks/deferred_probe.yml index 7b41e6cd0a..39c3c55dfb 100644 --- a/roles/sys-stk-front-proxy/tasks/deferred_probe.yml +++ b/roles/sys-stk-front-proxy/tasks/deferred_probe.yml @@ -1,6 +1,8 @@ --- - name: "🔍 Probe the vhosts this play queued" - when: front_proxy_deferred_probes | length > 0 + when: + - front_proxy_deferred_probes | length > 0 + - inventory_hostname == groups['svc-prx-openresty'][0] block: - name: "🔍 Check if the queued vhosts are reachable" uri_probe_batch: diff --git a/roles/sys-stk-front-proxy/tasks/main.yml b/roles/sys-stk-front-proxy/tasks/main.yml index c8c53b1b56..b871fea4eb 100644 --- a/roles/sys-stk-front-proxy/tasks/main.yml +++ b/roles/sys-stk-front-proxy/tasks/main.yml @@ -55,6 +55,7 @@ url: "{{ lookup('tls', front_proxy_domain, 'url.base') }}" status_codes: "{{ lookup('applications') | accepted_status_codes(front_proxy_application_id, lookup('tls', front_proxy_domain, 'domain')) }}" changed_when: false + when: IS_STACK_HOST | bool - name: 📂 Include dependencies include_role: