July 2014
Beginner
280 pages
5h 36m
English
It makes sense to have static host entries in /etc/hosts for some nodes since DNS outages may disrupt the services provided by those nodes. Examples of such services are backups, authentication, and kerberos. We'll use LDAP (authentication) in this example. In this scenario, we'll apply the ldap::server class to any LDAP server and add a collector for Host entries to our base class (the base class will be a default applied to all nodes). First, declare the exported resource in ldap::server, as shown in the following code snippet:
class ldap::server {
@@host {"ldap-$::hostname":
host_aliases => ["$::fqdn",'ldap'],
ip => "$::ipaddress",
}
}This will create an exported entry on any host to which we apply the ldap::server ...
Read now
Unlock full access