Skip to content

Commit b30ee61

Browse files
committed
(maint) Extract concrete inventory file for pr_testing workflow
The kvm_automation_tooling generated inventory files rely on the puppetlabs-terraform module plugins to extract target information from the Terraform state file. When we run openvox_bootstrap tasks, that module does not depend on puppetlabs-terraform, so we need an inventory file with explicit target information (ip addresses). The .inventory.targets from 'bolt inventory show --format json' is suitable as a concrete list of targets with a little massaging (there is a 'groups' entry that Bolt doesn't expect in an inventory file).
1 parent b811ef4 commit b30ee61

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/pr_testing_with_nested_vms.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,15 @@ jobs:
5858
"cpu_mode": "host-model"
5959
}
6060
]
61+
- name: Capture dereferenced inventory for use with openvox_bootstrap
62+
working-directory: kvm_automation_tooling
63+
run: |-
64+
bolt inventory --inventory terraform/instances/inventory.test.yaml show --format json --detail | \
65+
jq '.inventory | with_entries(select(.key == "targets")) | del(.targets[0].groups)' | \
66+
yq -P > ../puppet-openvox_bootstrap/inventory.yaml
6167
- name: Run openvox_bootstrap::install task on nested vm
6268
run: |-
63-
bolt task run openvox_bootstrap::install --inventory kvm_automation_tooling/terraform/instances/inventory.test.yaml --targets test-agent-1
69+
bolt task run openvox_bootstrap::install --inventory inventory.yaml --targets test-agent-1
6470
- name: Verify openvox-agent is installed
6571
run: |-
66-
bolt task run openvox_bootstrap::check version=8 test=gt --inventory kvm_automation_tooling/terraform/instances/inventory.test.yaml --targets test-agent-1
72+
bolt task run openvox_bootstrap::check version=8 test=gt --inventory inventory.yaml --targets test-agent-1

0 commit comments

Comments
 (0)