/srv/irclogs.ubuntu.com/2021/04/10/#cloud-init.txt

=== meena2 is now known as meena
=== ivo_cavalcante_ is now known as ivo_cavalcante
felixkaszaHi! Clearly I am too unintelligent to use cloud-init. For context, I am usingt multipass to play around and learn. I have a working user-data ("#cloud-config" format) that I feed into a new multipass VM like so:23:02
felixkaszamultipass -v launch -c 2 -d 4G -m 2G --cloud-init d:\raspberry-pi\ubuntu64\user-data -n b 2023:02
felixkasza.1023:02
felixkasza(sorry for the unwanted line break) To add a shell script for the "script user" module, I stuck the user-data YAML and the script into a MIME multi-part file which I feed to multipass in the exact same way:23:04
felixkaszamultipass -v launch -c 2 -d 4G -m 2G --cloud-init user-data -n b 20.1023:05
felixkaszaThe start of user-data now looks like this:23:05
felixkaszaContent-Type: multipart/mixed; boundary="===============5816695000811628090=="23:05
felixkaszaMIME-Version: 1.023:05
felixkasza--===============5816695000811628090==23:05
felixkaszaContent-Type: text/cloud-config; charset="utf-8"23:05
felixkaszaMIME-Version: 1.023:05
felixkaszaContent-Transfer-Encoding: base6423:05
felixkaszaContent-Disposition: attachment; filename="userdata.yaml"23:05
felixkaszaI2Nsb3VkLWNvbmZpZwoKIyBodHRwczovL2Nsb3VkaW5pdC5yZWFkdGhlZG9jcy5pby8KCgoj23:05
felixkaszaID09PT09IGluaXQgc3RhZ2UgPT09PT09PT09PT09PT09CgoKIyAtLS0tLSB3cml0ZSBmaWxl23:05
felixkasza[...]23:05
felixkasza(There is a blank line before the base64-encoded portion which the IRC client swallowed entire)23:06
felixkaszacloud-init rewards my efforts with "error loading cloud-init config: yaml-cpp: error at line 5, column 13: illegal map value"23:07
felixkaszaClearly I need to do something to tell cloud-init that I feeding it a mult-part MIME document. But what?23:08
felixkaszaAny help and pointers are very, very welcome. Thanks!23:08

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!