Should /etc/hosts contain an entry like '127.0.0.1 localhost myhost.example.org myhost'?

Solution 1:

Are you willing to accept working DNS a point of failure in your environment or not. Some services/applications will fail in certain configurations if a system cannot resolve the local machine's name.

If you have an absolutely critical service that must be running in all situations, it isn't unusual to add a an entry in the hosts file so that service can continue to operate in the situation where DNS resolution fails.

If you can accept your DNS as a point of failure, or if your services don't fail in the case of broken resolution, configuration entries in the hosts file can be avoided.

I strongly suggest you make your DNS servers as rock solid as possible, and if you must configure your hosts file, use a configuration management system to do it. You really should avoid manually avoid touch a hosts file.