From caf1f5d51080f45f03420e7d63c9c6509a5a2f40 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 15 Jan 2023 20:45:53 +0100 Subject: Configure other DNS internal servers --- personal_infra/puppet/site/01-dns.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 personal_infra/puppet/site/01-dns.pp (limited to 'personal_infra/puppet/site') 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"), + } +} -- cgit v1.2.3