X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d9ce053b71c151916fa8764b44a6058f827d3146..914fd142ba413854b6135901d572c87e917502b4:/cookbooks/bind/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/bind/recipes/default.rb b/cookbooks/bind/recipes/default.rb index aaba99781..087ef5802 100644 --- a/cookbooks/bind/recipes/default.rb +++ b/cookbooks/bind/recipes/default.rb @@ -19,8 +19,15 @@ include_recipe "networking" -ipv4_clients = [] -ipv6_clients = [] +clients = search(:node, "roles:#{node[:bind][:clients]}") + +ipv4_clients = clients.collect do |client| + client.ipaddresses(:family => :inet) +end.flatten + +ipv6_clients = clients.collect do |client| + client.ipaddresses(:family => :inet6) +end.flatten package "bind9"