- add eyaml to hiera.yaml - consolidate all paths into single tree - change to new profiles::dns::client wrapper - change to new profiles::dns::record wrapper - change to use concat method to build zone file
48 lines
1.0 KiB
Puppet
48 lines
1.0 KiB
Puppet
# profiles::dns::master authoritative service
|
|
class profiles::dns::master (
|
|
Array[String] $nameservers,
|
|
Stdlib::AbsolutePath $basedir,
|
|
Hash $acls = {},
|
|
Hash $zones = {},
|
|
Hash $views = {},
|
|
Hash $keys = {},
|
|
Hash[
|
|
String,
|
|
String
|
|
] $tags = {},
|
|
String $owner = 'root',
|
|
String $group = 'named',
|
|
Boolean $dnssec = false,
|
|
){
|
|
|
|
class {'profiles::dns::server':
|
|
acls => $acls,
|
|
zones => $zones,
|
|
views => $views,
|
|
keys => $keys,
|
|
forwarders => [],
|
|
dnssec => $dnssec,
|
|
}
|
|
|
|
# ensure the target basedir exists
|
|
file { $basedir:
|
|
ensure => directory,
|
|
owner => $owner,
|
|
group => $group,
|
|
}
|
|
|
|
# create zones
|
|
$zones.each | String $name, Hash $data | {
|
|
if $data['zone_type'] == 'master' {
|
|
profiles::dns::zone { $name:
|
|
zone => $data['domain'],
|
|
basedir => $basedir,
|
|
nameservers => $nameservers,
|
|
owner => $owner,
|
|
group => $group,
|
|
before => Bind::Zone[$name]
|
|
}
|
|
}
|
|
}
|
|
}
|