Skip to content

Commit f9f1105

Browse files
committed
make packer inventory groups clearer and allow defining no extra
1 parent 505d5f4 commit f9f1105

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/doca.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
9393
-var "source_image_name=${{ matrix.build.source_image_name }}" \
9494
-var "image_name=openhpc-doca" \
95-
-var "groups=doca" \
95+
-var "inventory_groups=doca" \
9696
openstack.pkr.hcl
9797
9898
- name: Get created image names from manifest

packer/openstack.pkr.hcl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ variable "metadata" {
132132
default = {}
133133
}
134134

135-
variable "groups" {
135+
variable "inventory_groups" {
136136
type = string
137-
description = "Comma-separated list of additional inventory groups (other than 'builder') to add build VM to"
138-
default = "" # this is
139-
# rocky-latest = ["update"]
137+
description = "Comma-separated list of additional inventory groups (other than 'builder') to add build VM to. Default is none."
138+
default = ""
139+
# rocky-latest = ["update"] # TODO: fix this in workflow
140140
# openhpc = ["control", "compute", "login"]
141141
}
142142

@@ -206,7 +206,7 @@ build {
206206

207207
provisioner "ansible" {
208208
playbook_file = "${var.repo_root}/ansible/fatimage.yml"
209-
groups = concat(["builder"], split(",", var.groups))
209+
groups = concat(["builder"], var.inventory_groups == "" ? [] : split(",", var.inventory_groups))
210210
keep_inventory_file = true # for debugging
211211
use_proxy = false # see https://www.packer.io/docs/provisioners/ansible#troubleshooting
212212
extra_arguments = [

0 commit comments

Comments
 (0)