-
Notifications
You must be signed in to change notification settings - Fork 30
Description
The /etc/hosts
man page (http://man7.org/linux/man-pages/man5/hosts.5.html) describes a difference between the "canonical_hostname" (fqdn) and the aliases for that hostname.
The LinuxAdmin::Hosts
class should expose that difference in its API. Maybe a method to specifically set the first name in the list and then a separate one that appends to the aliases?
This difference is reflected in the behaviour of some external tools such as cloud-init and freeipa.
These tools will retrieve the hostname (typically via the hostname
command or from /etc/hostname
) then consult /etc/hosts
to find the fqdn by taking the name in the "canonical_hostname" place in the line where the found hostname is an alias.
This can cause problems when the application acts differently based on whether the fqdn is "localhost" or not.