From d9cb44c847e94467940affb067609656d34fad44 Mon Sep 17 00:00:00 2001 From: John Jones Date: Tue, 14 Dec 2021 18:54:13 -0800 Subject: [PATCH] add example of needed cloud-config --- examples/http/ubuntu-2004/user-data | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/http/ubuntu-2004/user-data b/examples/http/ubuntu-2004/user-data index 9b6db74..c147090 100644 --- a/examples/http/ubuntu-2004/user-data +++ b/examples/http/ubuntu-2004/user-data @@ -1,4 +1,13 @@ #cloud-config + +# hack for cloud-init per: +# https://github.com/leakespeake/packer/blob/3f3e361751b4be9326b66771d96f2519bc8f885e/builders/vmware/vsphere-iso/ubuntu-server-20-04/hcl2/http/ubuntu-server-subiquity/user-data +runcmd: + # to enable true auto-install for Ubuntu 20.04 with cloud-init nocloud (eliminates "Continue with autoinstall?" prompt) + - [eval, 'echo $(cat /proc/cmdline) "autoinstall" > /root/cmdline'] + - [eval, 'mount -n --bind -o ro /root/cmdline /proc/cmdline'] + - [eval, 'snap restart subiquity.subiquity-service'] + autoinstall: version: 1 identity: