From 0884eb4e283b92c726fe01c519a7649bc140100a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 21 May 2026 16:21:49 +0200 Subject: [PATCH] debug(constructor): swap selected-host-vars dump for status + ansible_env + vars Diagnostic for the INFINITO_IP4-doesn't-propagate-to-Ansible CI symptom seen in test-deploy-server (run 26227822536, job 77184640736): networks.internet.ip4 keeps falling through to the 127.0.0.1 default even though INFINITO_IP4=172.30.0.10 is wired through default.env, the passthrough handler, the .env generator, and the compose env block. INFINITO_DNS_IP and INFINITO_DOMAIN flow through the same mechanism and land in Ansible correctly, so the asymmetry must be visible in either the controller process env (ansible_env) or the play namespace (vars). Dumping both at the start of the constructor stage, alongside the existing status lookup, gives a complete snapshot to diff against on the next CI run. The dump is gated on MODE_DEBUG, so it stays a no-op in non-debug deploys. Also tighten roles/sys-svc-container/files/test-dns.sh: the BUSYBOX_IMAGE / NODE_IMAGE env vars now fail loud via \${VAR:?...} instead of silently defaulting to busybox:1.37 / node:26-alpine. With the handler in roles/sys-svc-container/handlers/main.yml unconditionally injecting both via the image-lookup plugin, a missing override is a real misconfiguration, not something a stale literal should paper over. Co-Authored-By: Claude Opus 4.7 (1M context) --- roles/sys-svc-container/files/test-dns.sh | 4 ++-- tasks/stages/01_constructor.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/sys-svc-container/files/test-dns.sh b/roles/sys-svc-container/files/test-dns.sh index cb365cef44..14acb7cbef 100644 --- a/roles/sys-svc-container/files/test-dns.sh +++ b/roles/sys-svc-container/files/test-dns.sh @@ -4,8 +4,8 @@ set -euo pipefail # ------------------------------------------------------------ # Optional env overrides (with safe defaults) # ------------------------------------------------------------ -: "${BUSYBOX_IMAGE:=busybox:1.37}" -: "${NODE_IMAGE:=node:26-alpine}" +: "${BUSYBOX_IMAGE:?Missing Busybox image}" +: "${NODE_IMAGE:?Missing Busybox image}" # ------------------------------------------------------------ # Required env (must already be present in the container) diff --git a/tasks/stages/01_constructor.yml b/tasks/stages/01_constructor.yml index 69857e754a..e596c2171b 100644 --- a/tasks/stages/01_constructor.yml +++ b/tasks/stages/01_constructor.yml @@ -9,15 +9,15 @@ ansible.builtin.set_fact: DOCKER_IN_CONTAINER: "{{ (systemd_detect_virt_container.rc | default(1) | int) == 0 }}" -- name: Display selected initial host vars +- name: "Debug: dump status + ansible_env + vars" ansible.builtin.debug: msg: | - status: {{ lookup('status') | to_nice_yaml(indent=2) }} - RUNTIME: {{ RUNTIME }} - DOCKER_IN_CONTAINER: {{ DOCKER_IN_CONTAINER }} - TLS_ENABLED: {{ TLS_ENABLED }} - ASYNC_ENABLED: {{ ASYNC_ENABLED }} - SOFTWARE_NAME: {{ SOFTWARE_NAME }} + status: + {{ lookup('status') | to_nice_yaml(indent=2) }} + ansible_env: + {{ ansible_env | to_nice_yaml(indent=2) }} + vars: + {{ vars | to_nice_yaml(indent=2) }} when: MODE_DEBUG | bool - name: Check DNS resolution for test domain