/srv/irclogs.ubuntu.com/2013/09/05/#cloud-init.txt

=== shardy_afk is now known as shardy
kwadronautso, I read the docs: https://cloudinit.readthedocs.org/en/latest/topics/modules.html and think i still have some questions ;-)14:11
smoserkwadronaut, you can ask htem here.14:23
kwadronautsmoser: cheers. First question is: how can I contribute to that specific page?14:24
smoserits managed from code.14:24
smoserso you can write doc and make bzr merge request.14:25
kwadronautoh bzr. i forgot that.14:26
kwadronautwhich module would (re)generate ssh server keys?14:26
kwadronaut(I'm using the Debian packages)14:27
smoser'ssh' does that.14:31
smosercloudinit/config/cc_ssh.py14:31
kwadronautthanks14:32
kwadronauthmmm i am missing the right way to have it only run once (use case: take a snapshot, boot that, don't get a new ssh-key)14:58
smoserkwadronaut, it should only run once.14:58
smoserby default14:58
kwadronautin that case, i'll compare what i changed half a year ago with the defaults.14:59
smoserso the way that is handled is that the default is 'PER_INSTANCE'.14:59
smoserthe module can define *its* defualt, by defining 'frequency' in it. (cc_ssh does not do that). the values expected are one of15:00
smoserPER_INSTANCE = "once-per-instance"15:00
smoserPER_ALWAYS = "always"15:00
smoserPER_ONCE = "once"15:00
smoserand cloud-config can define a overriding value.15:01
smosersee example of 'cloud_config_modules' in doc/examples/cloud-config.txt15:01
kwadronautah, but instances get a new instance-id here if you snapshot and fire up the snapshot15:02
kwadronautthanks, i'm reading15:03
kwadronautthat document both has [ cloud-init-per, once, mymkfs, mkfs, /dev/vdb ] and [ apt-update-upgrade, always ]15:06
kwadronauti guess 1 way would be less confusing15:06
smoserkwadronaut, well, cloud-init-per is just a generic command.16:15
smoserthat you can can put into /usr/local/bin/ scripts or whatever16:15
smoserand it will run the command provided according to that frequency.16:16
smoserit may not actually be necessary in that case any more.16:16
smoserbut at one point bootcmd's didn't work for frequency16:16
smoseroh. yeah. you do need it there.16:17
smoserbecause 'bootcmd' module does run 'per_always'16:17
smoserbut if you only want a command to run once or per-isntance, then that command has to control itself.16:18
smoserkwadronaut, ^ did that make sense ?17:26
kwadronauti guess so, i was getting some food and will have a closer look today or tomorrow.18:42

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