By aref
Hello
I had created an Ubuntu 14.04 x64 droplet. I have a warning message in top of my /etc/hosts file.
# 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.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
before that in my other droplets when I want to set a sub-domain first I create the ‘a records’ in digital ocean panel then config my web server virtual hosts and then set up my domain details in /etc/hosts file. now I don’t change /etc/hosts but everything is ok and my virtual hosts work successfully.
I try to find manage_etc_hosts option for changing it but I didn’t find it.
let me now if it’s bad problem or no ? if yes how can I fix it ?
tnx a lot.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
To solve this add the line below at the bottom of file (or wherever you want): /etc/cloud/cloud.cfg
manage_etc_hosts: False
cloud.cfg is case-sensitive
If you use a bash script to provision your droplet add this:
echo 'manage_etc_hosts: False' | tee --append /etc/cloud/cloud.cfg
then, update your /etc/hosts
Those comments can be safely ignored. They are an artifact of how networking is initially set up on the first boot using Cloud-Init. After first boot, you should be able to manage /etc/hosts as you would normally expect.
I added manage_etc_hosts: false in /etc/cloud/cloud.cfg
…no help.
I “solved” (note quotes) this also as @Yeaoh did via /etc/cloud/templates/hosts.debian.tmpl
…that’s not how it’s supposed to be “solved”.
…and that’s not what the error message in the same file itself says = =.
Please bump this issue. much love
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.