Using Ubuntu 20.04 LTS on a Raspberry Pi and trying to setup a DNS and DCHP Server on it using DNSMasq
Got to the point where I want to add static DNS results in the /etc/hosts file however when I reboot all of the work I've done disappears and it resets.
Looking closer at the /etc/hosts file it says:
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
I tried:
- Adding manage_etc_hosts: false under preserve_hostname: false in /etc/cloud/cloud.cfg
- Removing manage_etc_hosts: True in /etc/cloud/templates/hosts.debian.tmpl
- grep -r manage_etc_hosts /etc/cloud which returned files with " included which was only the template files. I don't know how to edit the "cloud-config from user-data"
Can anyone help
Thanks
Jacob