[00:01] <kszarlej> hey guys. is it possible to run cloud init network configuration on every boot>
[00:02] <kszarlej> so after I add another IP to NoCloud config drive for an existing KVM VM cloud-init after reboot will
[00:02] <kszarlej> set this interface up?
[19:22] <kszarlej> Hey guys. I am using cloud-init NoCloud on my KVM VMS to setup networking using network-config. On first boot cloud-init sets up networking interfaces correctly. After first boot modifying network settings (adding another IP address to interface) doesnt work - the address is not added after reboot. Is it by design (so cloud-init reads networking info only on first boot?)
[19:22] <kszarlej> If yes then is there any possible way to "rerun" network configuration on every boot using cloud-init?
[19:50] <kszarlej> besides rebooting I was also trying 'systemctl stop cloud-init-local.service  && systemctl start cloud-init-local.service'
[19:51] <kszarlej> but it also doesnt add the new IP address. I am sure that new network-config is in the ISO /dev/sr0
[20:35] <blkadder> cloud-init is designed to run once.
[20:37] <kszarlej> blkadder: but it has 'per-always' 'per-instance' etc
[20:37] <kszarlej> I would like to set that interfaces are being setup 'per-always'
[20:37] <blkadder> There is a way to run something on subsequent boots, I was looking it up....
[20:38] <kszarlej> but I cannot find which "module" is setting up networking
[20:39] <kszarlej> none of the /etc/cloud/cloud.cfg surely
[20:39] <kszarlej> of the listed in*
[20:39] <kszarlej> there isnt any 'network' module
[20:45] <kszarlej> it looks like it is done my cloud-init-local
[20:48] <blkadder> I think (not positive someone smarter here may know) that this is what you'd use some sort of config management tool for. Cloud-init provides initial config then you hand off to config management for things you need to do repeatedly.
[20:48] <blkadder> That's my understanding anyways...
[20:53] <kszarlej> Ye but then I duplicate networking configuration between two tools
[20:53] <kszarlej> cloud-init and ie. ansible
[20:54] <kszarlej> it would be much better if cloud-init could do that
[20:57] <blkadder> So don't have cloud-init handle the network config and just use ansible?
[21:02] <kszarlej> How will I access an host using ansible+ssh when it has network not configured on start? :)
[21:03] <kszarlej> I dont want to log to every KVM VM and set manually IP address
[21:04] <kszarlej> its 21th century :)
[23:12] <blkadder> kszarlej, Distribute your network config playbook as part of the initial cloud-init config and run it.