From 8a753daed7d3c1e747e980aa507f3fa3322a5a6b Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Wed, 25 Jan 2023 14:30:58 +0100 Subject: [PATCH] Attempt to fix syntax --- packer/build.pkr.hcl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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" ] }