Skip to content

Commit 817a2ff

Browse files
committed
Add option to give extra args to packer build command
1 parent e2007af commit 817a2ff

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

roles/image_build/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ image_build_metadata: {}
1414
# The directory that contains the openstack.pkr.hcl to build the Slurm image
1515
image_build_packer_root_path: "{{ playbook_dir }}/vendor/stackhpc/ansible-slurm-appliance/packer"
1616

17+
# Extra args to pass to the packer build command
18+
image_build_packer_extra_args: ""
19+
1720
# Vars to apply to the builder group
1821
image_build_builder_group_vars:
1922
update_log_path: /tmp/update_log

roles/image_build/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
- name: Build image with packer
6565
command:
6666
cmd: |
67-
packer build -only openstack.openhpc -var-file={{ pkrvars_hcl_file.path }} openstack.pkr.hcl
67+
packer build {{ image_build_packer_extra_args }} -only openstack.openhpc -var-file={{ pkrvars_hcl_file.path }} openstack.pkr.hcl
6868
chdir: "{{ image_build_packer_root_path }}"
6969
environment:
7070
ANSIBLE_CONFIG: "{{ ansible_cfg_file.path }}"

0 commit comments

Comments
 (0)