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) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 4.7 committed 2026-05-21 16:22:33 +02:00
1 parent 13c93ad6d5
commit 0884eb4e28
2 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -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)
+7 -7
View File
@@ -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