aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/site/01-dns.pp
blob: eab766a461aa3e0e2ab2c8a1a0865e071a7a3379 (plain)
1
2
3
4
5
6
7
8
9
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"),
  }
}