diff --git a/data/QuickAndDirty/test.pkr.hcl b/data/QuickAndDirty/test.pkr.hcl index b9454aa..637c704 100644 --- a/data/QuickAndDirty/test.pkr.hcl +++ b/data/QuickAndDirty/test.pkr.hcl @@ -21,7 +21,7 @@ source "proxmox" "ubuntu" { password = "bzzYpm8koNtPKFYjpjXSyjFY" ssh_username = "firstuser" ssh_password = "firstuser" - ssh_timeout = "30m" + ssh_timeout = "10m" #username = "packer_build@pam" #password = "tvowyfv9gh23sdfAERtLWav2674" #ssh_username = "packer_build" @@ -56,4 +56,25 @@ source "proxmox" "ubuntu" { build { sources = [ "source.proxmox.ubuntu" ] + + provisioner "shell" { + pause_before = "20s" + environment_vars = [ + "DEBIAN_FRONTEND=noninteractive", + ] + inline = [ + "sleep 30", + "sudo apt-get update", + "sudo apt-get -y upgrade", + "sudo apt-get -y dist-upgrade", + "sudo apt-get -y install linux-generic linux-headers-generic linux-image-generic", + "sudo apt-get -y install wget curl", + "sudo apt-get -y autoremove", + "sudo apt-get -y autoclean", + + # DHCP Server assigns same IP address if machine-id is preserved, new machine-id will be generated on first boot + "sudo truncate -s 0 /etc/machine-id", + "exit 0", + ] + } } \ No newline at end of file