/srv/irclogs.ubuntu.com/2017/07/06/#cloud-init.txt

korean101Hi guys.01:55
korean101i use openstack Kilo releases. and i wanna change my user-data01:56
korean101but cached files in '/var/lib/clou01:56
korean101'/var/lib/cloud'01:56
korean101re read original user-data01:56
korean101how can i change already created user-data01:57
korean101??01:57
Puttikorean101, if you use nova, then try passing to nova boot the --user-data option, but I think if you ask openstack people they might give you a better answer07:08
korean101Putti: already created VM (with --user-data) -> can't change user-data07:08
korean101Putti: https://blueprints.launchpad.net/nova/+spec/userdata-modification (not yet)07:09
korean101Putti: thanks!!07:09
Puttiok, glad that something worked07:10
Putti:)07:10
=== frickler_ is now known as frickler
nixstarhello08:20
nixstarwanted to know if there is any way to get the fqdn - eth0 IP addr entry in /etc/hosts?08:22
nixstarwanted to get an entry like below08:22
nixstar10.87.3.83 comet.test.com comet08:22
nixstarnot able to see any variables that have IP addr in cloud-init08:23
Puttinixstar, at least something like a shell script given as user data should do it.09:40
Puttinixstar, or http://cloudinit.readthedocs.io/en/latest/topics/examples.html#writing-out-arbitrary-files09:41
nixstarthanks Putti09:43
nixstarI was hoping there must be some variable or inbuilt function that gets the IP09:44
=== shardy is now known as working_shardy
Puttinixstar, you should use this: http://cloudinit.readthedocs.io/en/latest/topics/modules.html#update-etc-hosts09:45
nixstari used that09:46
Puttiah yes, you want the ip too09:46
nixstaryes09:46
Puttinixstar, I looked the code cloudinit/distros/__init__.py and it seems not. Currently the value comes from the function _get_localhost_ip() so you could change that if you want, or could make a patch to be applied in upstream... I could even do that.09:57
Puttihmm or if you just change the ip with some script in /etc/cloud/templates/hosts.tmpl it looks like it preserves the ip addr09:58
Puttinixstar, you can of course use other tools like ansible to add the ip address there10:05
nixstarPutti, let me check the code10:11
PuttiI started making the patch but I'm currently looking code for getting the eth0 ip address.10:12
Puttican the interface have multiple ip addresses?10:13
nixstarIn my case no10:13
nixstarPutti are contributing member of cloud-init?10:17
nixstar* are you10:17
PuttiI have submitted some patches to the launchpad but none yet in10:18
nixstarok :)10:18
nixstarI haven't worked much with cloud-init, so thought there might be some to get the IP and ...came here10:19
=== working_shardy is now known as shardy
blackboxswnixstar Putti are you folks looking at  http://cloudinit.readthedocs.io/en/latest/topics/modules.html#set-hostname  maybe?16:08
blackboxswbummer, missed nixstar.16:08

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