Puppet Class: isp3node::base::hosts
- Defined in:
- manifests/base/hosts.pp
Summary
Manages a nodes hosts entriesOverview
Adds the node itself, all other managed nodes and additional entries from hiera to the hosts file
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'manifests/base/hosts.pp', line 18
class isp3node::base::hosts(
String $hostname = lookup('isp3node::base::hostname', String, undef, $facts['networking']['hostname']),
String $domain = lookup('isp3node::base::domain', String, undef, $facts['networking']['domain']),
String $ip = lookup('isp3node::base::ip', String, undef, $facts['ipaddress']),
Optional[Hash[String, Hash]] $entries = {}
) {
# Export own host data
@@host {"${hostname}.${domain}":
ensure => present,
tag => ['ispnode'],
alias => $hostname,
ip => $ip,
comment => "ISPConfig node ${hostname}, provisioned by puppet"
}
Host <<| tag == 'ispnode' |>>
create_resources(host, $entries)
}
|