diff --git a/packer/build.pkr.hcl b/packer/build.pkr.hcl index 8995dcf..2a1b241 100644 --- a/packer/build.pkr.hcl +++ b/packer/build.pkr.hcl @@ -7,21 +7,11 @@ build { source "vsphere-iso.ubuntu" { name = "bootstrap" vm_name = "bld_${var.vm_name}_bootstrap" - - export { - images = false - output_directory = "/scratch/airgapped-k8s/bootstrap" - } } source "vsphere-iso.ubuntu" { name = "upgrade" vm_name = "bld_${var.vm_name}_upgrade" - - export { - images = false - output_directory = "/scratch/airgapped-k8s/upgrade" - } } provisioner "ansible" { @@ -50,11 +40,11 @@ build { inline = [ "pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\", " -ApplianceType '${source.name}' \\", - " -OVFFile '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.ovf' \"", + " -OVFFile '/scratch/bld_${var.vm_name}_${source.name}.ovf' \"", "pwsh -file scripts/Update-Manifest.ps1 \\", - " -ManifestFileName '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.mf'", + " -ManifestFileName '/scratch/bld_${var.vm_name}_${source.name}.mf'", "ovftool --acceptAllEulas --allowExtraConfig --overwrite \\", - " '/scratch/airgapped-k8s/${source.name}/ova.${source.name}-${var.vm_name}.ovf' \\", + " '/scratch/bld_${var.vm_name}_${source.name}.ovf' \\", " /output/airgapped-k8s-${var.k8s_version}.${source.name}.ova" ] } diff --git a/packer/source.pkr.hcl b/packer/source.pkr.hcl index 3774c76..02b2f3f 100644 --- a/packer/source.pkr.hcl +++ b/packer/source.pkr.hcl @@ -53,4 +53,9 @@ source "vsphere-iso" "ubuntu" { shutdown_timeout = "5m" remove_cdrom = true + + export { + images = false + output_directory = "/scratch" + } }