aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/site
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-01-15 20:45:53 +0100
committeralex <alex@pdp7.net>2023-01-15 20:45:53 +0100
commitcaf1f5d51080f45f03420e7d63c9c6509a5a2f40 (patch)
treefc03ee204e4730457d2145a6041ee458dadebc9e /personal_infra/puppet/site
parentb129ac5c697eb69ea9588a5c4d0166d3f81b9596 (diff)
Configure other DNS internal servers
Diffstat (limited to 'personal_infra/puppet/site')
-rw-r--r--personal_infra/puppet/site/01-dns.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/personal_infra/puppet/site/01-dns.pp b/personal_infra/puppet/site/01-dns.pp
new file mode 100644
index 00000000..eab766a4
--- /dev/null
+++ b/personal_infra/puppet/site/01-dns.pp
@@ -0,0 +1,10 @@
+$dns_source_hosts = lookup("dns.source_hosts")
+$dns_other_hosts = $dns_source_hosts.filter |$host_name| { $host_name != $facts["networking"]["fqdn"] }
+
+$dns_other_server_defs = $dns_other_hosts.map |$host_name| {
+ {
+ network_name => join([lookup("hostvars.'$host_name'.network.network_name"), lookup('dns.internal_domain')], '.'),
+ reverse_ip_range => lookup("hostvars.'$host_name'.network.self_internal_network"),
+ dns_ip => lookup("hostvars.'$host_name'.network.self_internal_ip"),
+ }
+}