meena | sheesh | 08:01 |
---|---|---|
=== FergusL2 is now known as FergusL | ||
Nothing4You | hi, is it possible to provide run-once scripts in userdata? | 13:31 |
rbasak | Nothing4You: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#run-commands-on-first-boot | 13:33 |
rbasak | That's an example of cloud-init-per | 13:34 |
rbasak | But you probably want to use it against runcmd instead (the following example) | 13:34 |
Nothing4You | rbasak: i was intending to run stuff in the final stage which this would be part of https://cloudinit.readthedocs.io/en/latest/topics/modules.html#scripts-per-once | 13:35 |
Nothing4You | i guess a workaround could be to create the script in bootcmd/runcmd and write it to a file that will be loaded in the final stage | 13:36 |
rbasak | Nothing4You: is that not the equivalent of https://cloudinit.readthedocs.io/en/latest/topics/modules.html#runcmd anyway? | 13:38 |
rbasak | In terms of stage. | 13:38 |
Nothing4You | runcmd runs in the config stage | 13:39 |
falcojr | Nothing4You: runcmd runs during config stage, but all it does there is write the script to /var/lib/cloud/instances/scripts | 14:11 |
falcojr | the script gets executed via the scripts-user module in the final phase | 14:12 |
Nothing4You | ah, thanks | 14:12 |
Nothing4You | if i specify package_reboot_if_required=true, does that reboot happen as part of the package-update-upgrade-install module before processing the other final stage modules? | 14:13 |
=== arif-ali- is now known as arif-ali | ||
smoser | yes | 20:25 |
smoser | Nothing4You: ^. it happens when installing packages and then reboots before going further. | 20:25 |
smoser | and then picks up again. | 20:25 |
smoser | but that only works on debian/ubuntu | 20:26 |
Nothing4You | thanks | 20:26 |
Nothing4You | debian in my case, so that's fine | 20:26 |
smoser | it relies on /var/run/reboot-required or some such being written. so ... i spoke without verifying that. | 20:32 |
smoser | but it does work on ubuntu | 20:32 |
Nothing4You | it's definitely rebooting my debian 10 machines | 20:34 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!