diff --git a/packer/build.pkr.hcl b/packer/build.pkr.hcl index 6b05668..ef3bc33 100644 --- a/packer/build.pkr.hcl +++ b/packer/build.pkr.hcl @@ -6,7 +6,7 @@ packer { build { source "vsphere-iso.ubuntu" { name = "bootstrap" - vm_name = "${var.vm_name}-${build.PackerRunUUID}" + vm_name = "${var.vm_name}-{{ build `PackerRunUUID` }}" } provisioner "ansible" { @@ -31,11 +31,11 @@ build { inline = [ "pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\", " -ApplianceType '${source.name}' \\", - " -OVFFile '/scratch/airgapped-k8s/${var.vm_name}-${build.PackerRunUUID}.ovf' \"", + " -OVFFile '/scratch/airgapped-k8s/${var.vm_name}-{{ build `PackerRunUUID` }}.ovf' \"", "pwsh -file scripts/Update-Manifest.ps1 \\", - " -ManifestFileName '/scratch/airgapped-k8s/${var.vm_name}-${build.PackerRunUUID}.mf'", + " -ManifestFileName '/scratch/airgapped-k8s/${var.vm_name}-{{ build `PackerRunUUID` }}.mf'", "ovftool --acceptAllEulas --allowExtraConfig --overwrite \\", - " '/scratch/airgapped-k8s/${var.vm_name}-${build.PackerRunUUID}.ovf' \\", + " '/scratch/airgapped-k8s/${var.vm_name}-{{ build `PackerRunUUID` }}.ovf' \\", " /output/airgapped-k8s.${source.name}.ova" ] } @@ -44,7 +44,7 @@ build { build { source "vsphere-iso.ubuntu" { name = "upgrade" - vm_name = "${var.vm_name}-${build.PackerRunUUID}" + vm_name = "${var.vm_name}-{{ build `PackerRunUUID` }}" } provisioner "ansible" { @@ -69,11 +69,11 @@ build { inline = [ "pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\", " -ApplianceType '${source.name}' \\", - " -OVFFile '/scratch/airgapped-k8s/${var.vm_name}-${build.PackerRunUUID}.ovf' \"", + " -OVFFile '/scratch/airgapped-k8s/${var.vm_name}-{{ build `PackerRunUUID` }}.ovf' \"", "pwsh -file scripts/Update-Manifest.ps1 \\", - " -ManifestFileName '/scratch/airgapped-k8s/${var.vm_name}-${build.PackerRunUUID}.mf'", + " -ManifestFileName '/scratch/airgapped-k8s/${var.vm_name}-{{ build `PackerRunUUID` }}.mf'", "ovftool --acceptAllEulas --allowExtraConfig --overwrite \\", - " '/scratch/airgapped-k8s/${var.vm_name}-${build.PackerRunUUID}.ovf' \\", + " '/scratch/airgapped-k8s/${var.vm_name}-{{ build `PackerRunUUID` }}.ovf' \\", " /output/airgapped-k8s.${source.name}.ova" ] }