Install every required collection/role first, before anything else runs #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/install-collections-first"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
New playbooks/install_collections.yml, imported between dynamic_inventory.yml and infra_work.yml, which drops its own former Play 2 entirely. Collects ansible_roles_list from every matched (planned-leaf) host -- available immediately after dynamic_inventory.yml, before Play 1 provisions anything -- instead of waiting for provision_tech_targets. Confirmed live that a discovered host's own provision_unit is always an unchanged copy of the planned leaf's list, so nothing is missed.
ansible_roles_list entries now declare source: git|localpath with path holding the actual location (one key for both kinds). Batched into one ansible-galaxy invocation per (source, collection-vs-role) kind.
Also fixes inventory_default_provision_roles' silvarion.provision.proxmox entry to carry its own source/path -- a bare entry here silently discarded whatever richer entry a leaf's own list declared for the same name, which only became a real problem once this became the sole installer.
Verified live against the real infrastructure/homelab repo (docker/core leaf). Confirmed the known silvarion.repos -> silvarion.databases transitive-dependency gap is unaffected either way (pre-existing, separate issue).
🤖 Generated with Claude Code
https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp
New playbooks/install_collections.yml, imported between dynamic_inventory.yml and infra_work.yml, which drops its own former Play 2 ("install required roles on the controller") entirely. Collects ansible_roles_list from every matched host (the planned-leaf host, available immediately after dynamic_inventory.yml -- confirmed against roles/proxmox/tasks/create/ lxc.yml's Step 6 that a discovered host's own provision_unit is always an unchanged copy of the same list) instead of waiting for provision_tech_targets, which only exists after Play 1 provisions -- by which point Play 1 had already needed its own silvarion.provision.* roles installed. ansible_roles_list entries now declare source: git|localpath with path holding the actual location (one key for both kinds -- ansible-galaxy itself doesn't distinguish "URL" from "path" as separate concepts), not a single source field holding the location string directly with type sniffed by regex. Batched into one ansible-galaxy invocation per (source, collection-vs-role) kind. Also fixes inventory_default_provision_roles' silvarion.provision.proxmox entry to carry its own source/path -- a bare entry here was always silently preferred over whatever richer entry a leaf's own ansible_roles_list_default declared for the same name, which only became a real problem once this playbook became the sole installer with no external self-install mechanism to fall back on. Verified live against the real infrastructure/homelab repo (docker/core leaf): correct install specs derived and batched, confirmed the silvarion.provision.proxmox default-role fix actually restores its source/path, and confirmed the known silvarion.repos -> silvarion.databases transitive-dependency gap is unaffected either way (pre-existing, orthogonal to this change). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp