/srv/irclogs.ubuntu.com/2022/07/04/#cloud-init.txt

=== toolz is now known as Guest7763
=== Guest7763 is now known as Daniel
somepadHi all, I have a php application which is going to be deployed in cloud using vms. I can build disk image with an app and all required software, but during the vm creation it is needed to place a config.php crafted for this particular vm. So, is it possible to use cloud-init to prepare a file using jinja2 template and drop it to the disk?15:17
minimalsomepad: "runcmd" with script to do the work?15:19
somepadNot sure, I never used cloud-init basically. :(15:22
minimalsomepad: https://cloudinit.readthedocs.io/en/latest/15:23
somepadFrom the examples, write_files looks like a solution, but it want the content to be inside cloud-config...15:25
somepadI should give it a try probably15:28
minimalwrite_files can create files but not sure if it handles jinja templating15:28
minimal"want the content to be inside cloud-config" - unclear what you mean, the likes of "write_files" would be part of user-data15:29

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