File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
chef/cookbooks/designate/recipes Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1818
1919require "yaml"
2020
21- dns = node_search_with_cache ( "roles:dns-server" ) . first
21+ dns_all = node_search_with_cache ( "roles:dns-server" )
22+ dns = dns_all . first
2223dnsmaster = dns [ :dns ] [ :master_ip ]
2324dnsslaves = dns [ :dns ] [ :slave_ips ] . to_a
2425dnsservers = [ dnsmaster ] + dnsslaves
3435# with every delete/create cycle of proposal. This might mess
3536# up the designate configuration. So the advantage of having
3637# non-hardcoded is high enough
38+
39+ ns_records = dns_all . map { |dnss | { "hostname" => "public-#{ dnss [ :fqdn ] } ." , "priority" => 1 } }
3740pools = [ {
3841 "name" => "default-bind" ,
3942 "description" => "Default BIND9 Pool" ,
4043 "id" => "794ccc2c-d751-44fe-b57f-8894c9f5c842" ,
4144 "attributes" => { } ,
42- "ns_records" => [ { "hostname" => " #{ dns [ :fqdn ] } ." , "priority" => 1 } ] ,
45+ "ns_records" => ns_records ,
4346 "nameservers" => dnsservers . map { |ip | { "host" => ip , "port" => 53 } } ,
4447 "also_notifies" => dnsslaves . map { |ip | { "host" => ip , "port" => 53 } } ,
4548 "targets" => [ {
You can’t perform that action at this time.
0 commit comments