pallet.crate.etc-hosts documentation

/etc/hosts file.

add-host

fn

[ip-address names]

Declare a host entry. Names should be a sequence of names.

add-hosts

fn

[hosts-map]

Add a map of ip address to a sequence of hostname/aliases, to the host file settings.

host-entry

fn

[{:keys [use-hostname use-private-ip], :or {use-hostname true, use-private-ip true}}]

Get a host entry for the current node. Options all default to true and hostname takes priority over target-name, and private-ip over primary-ip.

hostname

fn

[{:keys [fqdn]}]

Get the hostname as reported on the node.

hosts

fn

[]

Writes the hosts files

resolve-dns

fn

[hostname]

Get the ip for a hostname.

reverse-dns

fn

[ip]

Get the hostname reported for the specified ip.

set-hostname

fn

[& {:keys [update-etc-hosts], :or {update-etc-hosts true}}]

Set the hostname on a node. Note that sudo may stop working if the hostname is not in /etc/hosts.