Add scripts/provision.sh to work around ansible.cfg's world-writable-mount gap #2

Merged
jsanchezd merged 1 commit from fix/provision-wrapper-script into main 2026-10-02 15:07:26 +00:00
Owner

The zero-flag convenience depends entirely on ansible.cfg's auto-discovery succeeding, which silently refuses to load when the CWD is world-writable (confirmed live on a WSL drvfs mount). When that happens, the render plugin never runs and the playbook hard-fails with no inventory parsed and no actionable fallback.

scripts/provision.sh passes -i and playbook_inventory_render_dir explicitly every time (fresh mktemp -d per run, cleaned up on exit) -- bypasses ansible.cfg resolution entirely. Verified live: reproduced the exact failure with a bare ansible-playbook call from /tmp with ANSIBLE_CONFIG unset, then confirmed the wrapper succeeds through the same step from identical starting conditions.

🤖 Generated with Claude Code

https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp

The zero-flag convenience depends entirely on ansible.cfg's auto-discovery succeeding, which silently refuses to load when the CWD is world-writable (confirmed live on a WSL drvfs mount). When that happens, the render plugin never runs and the playbook hard-fails with no inventory parsed and no actionable fallback. scripts/provision.sh passes `-i` and `playbook_inventory_render_dir` explicitly every time (fresh mktemp -d per run, cleaned up on exit) -- bypasses ansible.cfg resolution entirely. Verified live: reproduced the exact failure with a bare ansible-playbook call from /tmp with ANSIBLE_CONFIG unset, then confirmed the wrapper succeeds through the same step from identical starting conditions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp
Add scripts/provision.sh to work around ansible.cfg's world-writable-mount gap
All checks were successful
Ansible Lint / ansible-lint (pull_request) Successful in 36s
bfc4a9ff42
The zero-flag convenience (plain `ansible-playbook silvarion.provision.main`)
depends entirely on ansible.cfg's auto-discovery succeeding, which silently
refuses to load at all when the CWD is world-writable (confirmed live,
2026-10-02: WSL's drvfs/9p mount reports every file/dir as 777 regardless of
real permissions). When that happens, the render plugin never runs,
_provision_inventory_render_dir never gets set, and the playbook hard-fails
on its first argument-spec check with "No inventory was parsed, only
implicit localhost is available" and no actionable fallback -- a real,
hit-in-practice design gap, not a one-off misconfiguration.

scripts/provision.sh passes -i and playbook_inventory_render_dir explicitly
on the command line every time (a fresh mktemp -d per invocation, cleaned
up on exit), which bypasses ansible.cfg resolution entirely -- an explicit
-i always wins regardless of CWD or filesystem. Verified live: reproduced
the exact failure with a bare ansible-playbook call from /tmp with
ANSIBLE_CONFIG unset, then confirmed scripts/provision.sh succeeds through
the same inventory-parse step from the identical starting conditions.

Deliberately NOT a static/shared default directory (e.g. hardcoding
inventory_render_dir to a fixed path) -- that would let stale host_vars/
topology files from a previous run leak into the next one, since nothing
would ever clean a shared path between invocations. A fresh directory per
run, cleaned up on exit, is what the file-based inventory design actually
needs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp
jsanchezd deleted branch fix/provision-wrapper-script 2026-10-02 15:07:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ansible-collections/silvarion.provision!2
No description provided.