feat: add unkin.net domain (#347)

- 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

Reviewed-on: #347
This commit was merged in pull request #347.
This commit is contained in:
2025-07-06 20:02:20 +10:00
parent 2814a55df6
commit 2d9faf578f
8 changed files with 63 additions and 15 deletions
+14 -8
View File
@@ -18,11 +18,13 @@ class profiles::haproxy::dns (
# export cnames for haproxy applications
$cnames.each |$cname| {
$parts = split($cname, '\.')
$domain = join($parts[1, $parts.length], '.')
profiles::dns::record { "${::facts['networking']['fqdn']}_${cname}_CNAME":
value => "${location_environment}-halb",
type => 'CNAME',
record => "${cname}.",
zone => $::facts['networking']['domain'],
zone => $domain,
order => $order,
}
}
@@ -41,20 +43,24 @@ class profiles::haproxy::dns (
# if this is the first host in the returned filter, export a/cnames for haproxy applications
if $servers_array[0] == $trusted['certname'] {
profiles::dns::record { "${facts['networking']['fqdn']}_vrrp_${location_environment}-halb-vrrp":
value => $ipaddr,
type => 'A',
record => "${location_environment}-halb-vrrp",
zone => $::facts['networking']['domain'],
order => $order,
['main.unkin.net', 'unkin.net'].each |$domain| {
profiles::dns::record { "${facts['networking']['fqdn']}_vrrp_${domain}_${location_environment}-halb-vrrp":
value => $ipaddr,
type => 'A',
record => "${location_environment}-halb-vrrp",
zone => $domain,
order => $order,
}
}
$vrrp_cnames.each |$cname| {
$parts = split($cname, '\.')
$domain = join($parts[1, $parts.length], '.')
profiles::dns::record { "${::facts['networking']['fqdn']}_${cname}_CNAME":
value => "${location_environment}-halb-vrrp",
type => 'CNAME',
record => "${cname}.",
zone => $::facts['networking']['domain'],
zone => $domain,
order => $order,
}
}