/srv/irclogs.ubuntu.com/2020/11/28/#cloud-init.txt

=== vrubiolo1 is now known as vrubiolo
dagbis there a simple one-liner I can use to add a root-pw or a ssh-key to a downloaded img-file?13:55
Krikkeyou can do it with cloud init13:56
dagbI feel like I have a *really* simple problem, and all solutions requires learning sanskrit. from americ. with clay tablets.13:56
Krikkeor you can just mount the image, chroot into it and change the pw13:56
dagbamharic?13:56
dagbKrikke the last one requires libguestfs, right?13:57
dagbKrikke: do you care to suggest a quick and simple way to do it with cloud-init?13:58
Krikkehttps://cloudinit.readthedocs.io/en/latest/topics/examples.html13:58
Krikkeyou can put it in users section as ssh_authorized_keys13:59
Krikkeor passwd / plain_text_passwd and then set lock_passwd: false13:59
dagbthank you. this looks promising14:00
dagbwith the glaring exception that I do not understand how to apply the config to my image?14:08
dagbI need to create a disk image with the config data on it, it appears14:13
KrikkeI dunno, depends on image I guess14:15
Krikkeopenstack images have cloudinit pre-installed I think14:15
dagbThere is nothing analog to 'cloud-init myconfig.json diskimag.img  '14:16
Krikkemaybe it's also possible to mount the cloudinit volume14:16
Krikkeno it's a software that runs when the os boots from the image14:16
KrikkeI'm using libvirt with terraform, it mounts an iso with the cloud init stuff when it creates the vm14:19
Krikkeyeah seems it mounts the config from an iso file14:43
dagbKrikke: thank you for guiding my onto the right path.14:47
dagbme14:47
dagbfinally figured it out.14:48
Krikkenice, np14:48

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