From db2cfab3b192c6a758deb3641d0c8256a60f2c90 Mon Sep 17 00:00:00 2001 From: Derek Date: Fri, 4 Sep 2026 10:25:28 +1000 Subject: [PATCH] fix(ansible): load the shared vars for every inventory hyperi_github_token, hyperi_github_headers, hyperi_github_env and hyperi_core_versions lived in inventories/localhost/group_vars, so playbooks/main.yml only worked with that one inventory. Against any other, a test VM or a fleet host, the first task to reference them failed undefined - the Rust role's build-environment step, on a clean VM, after thirty tasks had run. The variables belong to the playbook, not to one inventory: they are read from the control node's environment and name the versions the roles install. Moved to playbooks/group_vars, which Ansible loads beside the playbook for whatever inventory is passed. The localhost install path is unchanged. --- ansible/molecule/existing-host/molecule.yml | 2 +- ansible/{inventories/localhost => playbooks}/group_vars/all.yml | 0 ansible/roles/developer/defaults/main.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename ansible/{inventories/localhost => playbooks}/group_vars/all.yml (100%) diff --git a/ansible/molecule/existing-host/molecule.yml b/ansible/molecule/existing-host/molecule.yml index d4aedb0..f87b771 100644 --- a/ansible/molecule/existing-host/molecule.yml +++ b/ansible/molecule/existing-host/molecule.yml @@ -58,7 +58,7 @@ provisioner: hosts: inventory.yml # The version SSoT. Without it any task reading hyperi_core_versions # (the rustup pin, node_major) is undefined under this scenario. - group_vars: ${MOLECULE_PROJECT_DIRECTORY}/inventories/localhost/group_vars + group_vars: ${MOLECULE_PROJECT_DIRECTORY}/playbooks/group_vars scenario: name: existing-host diff --git a/ansible/inventories/localhost/group_vars/all.yml b/ansible/playbooks/group_vars/all.yml similarity index 100% rename from ansible/inventories/localhost/group_vars/all.yml rename to ansible/playbooks/group_vars/all.yml diff --git a/ansible/roles/developer/defaults/main.yml b/ansible/roles/developer/defaults/main.yml index de589af..98ada28 100644 --- a/ansible/roles/developer/defaults/main.yml +++ b/ansible/roles/developer/defaults/main.yml @@ -54,7 +54,7 @@ docker_fedora_supported_releases: # NodeSource publishes a repo PER MAJOR (node_24.x, node_22.x) and both provide # the package `nodejs`, so a box can hold exactly one system-wide major. That is # the n slot; fnm covers n-1 per user. Majors come from the SSoT -- see -# hyperi_core_versions in inventories/localhost/group_vars/all.yml. +# hyperi_core_versions in playbooks/group_vars/all.yml. # # The deb and rpm repos are signed by DIFFERENT keys, so both URLs are carried. node_major: "{{ hyperi_core_versions.node_major }}"