puppet-prod/site/profiles/manifests/dns/zone.pp
Ben Vincent 554d24a0cd feat: add unkin.net domain
- manage the unkin.net domain
- ensure forwarding for unkin.net
- split domain from cname list and set zone correctly
- add fafflix to cnames list for haproxy2
2025-07-06 20:01:55 +10:00

29 lines
780 B
Puppet

# defines a zone
define profiles::dns::zone (
String $zone,
Array[String] $nameservers,
Stdlib::AbsolutePath $basedir,
String $owner,
String $group,
Optional[Hash[String, String]] $glue_records = {},
) {
# 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" |>>
}