From 1941e02d949adbc2336565a02984e2d8a9d3e9e2 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 5 Apr 2023 17:30:24 +0200 Subject: [PATCH] Fix post-processor paths --- packer/build.pkr.hcl | 16 +++------------- packer/source.pkr.hcl | 5 +++++ 2 files changed, 8 insertions(+), 13 deletions(-) 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" + } }