From 65ab76eda667ecb82ce7f733efe98a0d28122b89 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Mon, 18 Mar 2024 16:02:34 -0500 Subject: [PATCH] testing --- lib/bento/runner.rb | 4 ++-- packer_templates/pkr-variables.pkr.hcl | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/bento/runner.rb b/lib/bento/runner.rb index fdeda596f..b59554dcc 100644 --- a/lib/bento/runner.rb +++ b/lib/bento/runner.rb @@ -17,7 +17,7 @@ def initialize(opts) @dry_run = opts.dry_run @metadata_only = opts.metadata_only @debug = opts.debug - @only = opts.only + @only = opts.only ||= nil @except = opts.except @mirror = opts.mirror @headed = opts.headed ||= false @@ -87,7 +87,7 @@ def packer_build_cmd(template, _var_file) var_files.each do |var_file| cmd.insert(5, "-var-file=#{var_file}") if File.exist?(var_file) end if var_files - cmd.insert(4, "-only=#{only}") + cmd.insert(4, "-only=#{only}") if only cmd.insert(4, "-except=#{except}") if except # Build the command line in the correct order and without spaces as future input for the splat operator. cmd.insert(4, "-var cpus=#{cpus}") if cpus diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 855eeb994..ccde6ce5b 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -38,7 +38,6 @@ variable "no_proxy" { variable "sources_enabled" { type = list(string) default = [ - "source.hyperv-iso.vm", "source.parallels-iso.vm", "source.qemu.vm", "source.virtualbox-iso.vm",