fix: enable dynamic/tsig updates

- 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
This commit is contained in:
2023-11-13 22:17:59 +11:00
parent 4b0b2b1ed0
commit c996c9b7e3
11 changed files with 149 additions and 37 deletions
+27
View File
@@ -0,0 +1,27 @@
# defines a zone
define profiles::dns::zone (
String $zone,
Array[String] $nameservers,
Stdlib::AbsolutePath $basedir,
String $owner,
String $group,
) {
# Define the concat resource for the zone file
concat { "${basedir}/${zone}.conf":
ensure => present,
owner => $owner,
group => $group,
mode => '0640',
}
# Add the header fragment (from the template)
concat::fragment { "${basedir}/${zone}_header":
target => "${basedir}/${zone}.conf",
content => template('profiles/dns/zone_header.erb'),
order => '01',
}
# Collect exported fragments for this zone
Concat::Fragment <<| target == "${basedir}/${zone}.conf" |>>
}