X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2e17bd4b4697423f9c124cfdb802424a58c16d80..2fe909805ca8ed064276b207c853725fbf1ffaae:/cookbooks/munin/recipes/default.rb diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 0a2a34452..a54b38718 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -24,13 +24,9 @@ service "munin-node" do supports :status => true, :restart => true, :reload => true end -servers = [] - -search(:node, "recipes:munin\\:\\:server").each do |server| - server.interfaces(:role => :external) do |interface| - servers << interface[:address] - end -end +servers = search(:node, "recipes:munin\\:\\:server").collect do |server| + server.ipaddresses(:role => :external) +end.flatten firewall_rule "accept-munin" do action :accept