diff options
Diffstat (limited to 'personal_infra/puppet/site')
| -rw-r--r-- | personal_infra/puppet/site/01-dns.pp | 10 |
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"), + } +} |
