Make your changes to /etc/hosts, and then do:
chattr +i /etc/hosts
it then makes the file immutable to changes. I do this at OVH with my /etc/resolv.conf because they constantly overwrite it despite me trying to get cloudinit to stop doing it.
Make your changes to /etc/hosts, and then do:
chattr +i /etc/hosts
it then makes the file immutable to changes. I do this at OVH with my /etc/resolv.conf because they constantly overwrite it despite me trying to get cloudinit to stop doing it.