propellor-2.16.0: property-based host configuration management in haskell

Safe HaskellNone




sane :: Property NoInfo Source

Ensures that the hostname is set using best practices, to whatever name the Host has.

Configures both /etc/hostname and the current hostname. (However, when used inside a chroot, avoids setting the current hostname as that would impact the system outside the chroot.)

Configures /etc/mailname with the domain part of the hostname.

/etc/hosts is also configured, with an entry for, which is standard at least on Debian to set the FDQN.

Also, the /etc/hosts line is set to localhost. Putting any other hostnames there is not best practices and can lead to annoying messages from eg, apache.

searchDomain :: Property NoInfo Source

Makes /etc/resolv.conf contain search and domain lines for the domain that the hostname is in.

type ExtractDomain = HostName -> String Source

Function to extract the domain name from a HostName.

extractDomain :: ExtractDomain Source

hostname of has a domain of But, when the hostname is, the domain is too.

This doesn't work for eg,, or when is in a subdomain. If you are in such a network, provide your own ExtractDomain function to the properties above.