← Back to team overview

openstack team mailing list archive

How to update /etc/hosts file for VM

 

Hello,
I just got Folsom installed and everything works fine.

I now want the /etc/hosts file in the VM (am using ubuntu as an example)
to have a mapping of hostname to floating IP address.
Is there a way to automate that using user-data/metadata and cloud-init?

Of course it works manually but I don't want to require a manual update of
/etc/hosts file for any new VM created.

Thanks,

-Farhan.




References