Puppet Class: kickstack::nameresolution
- Inherits:
- kickstack
- Defined in:
- manifests/nameresolution.pp
Overview
Simple convenience class for name resolution.
Exports the current host’s name, along with the IP address associated with the management NIC.
Currently supports only entries in /etc/hosts. Alternative implementations might dynamically manage DNS entries.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'manifests/nameresolution.pp', line 8
class kickstack::nameresolution inherits kickstack {
case $::kickstack::name_resolution {
'hosts': {
$host = pick($fqdn,$hostname)
if $fqdn {
$aliases = [ $hostname ]
} else {
$aliases = []
}
@@host { $host:
ip => getvar("ipaddress_${::kickstack::nic_management}"),
host_aliases => $aliases,
comment => 'Managed by Puppet',
tag => 'hostname'
}
Host <<| tag == 'hostname' |>> { }
}
default: {
fail("Unsupported value for \$kickstack::name_resolution: $::kickstack::name_resolution")
}
}
}
|