]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/recipes/server.rb
Bump cookstyle from 6.15.5 to 6.15.9
[chef.git] / cookbooks / munin / recipes / server.rb
index 881b7d5d89a3f6190b1092b656391f5213f34485..bd15766800e28bbe54ddffd3796b6443681427b0 100644 (file)
@@ -46,8 +46,12 @@ munin_plugin "rrdcached"
 expiry_time = 14 * 86400
 
 clients = search(:node, "recipes:munin\\:\\:default").sort_by(&:name)
-frontends = search(:node, "recipes:web\\:\\:frontend").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.map(&:name).sort
-backends = search(:node, "recipes:web\\:\\:backend").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.map(&:name).sort
+frontends = search(:node, "recipes:web\\:\\:frontend").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.sort_by(&:name).map do |n|
+  { :name => n.name.split(".").first, :interface => n.interfaces(:role => :external).first[:interface].tr(".", "_") }
+end
+backends = search(:node, "recipes:web\\:\\:backend").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.sort_by(&:name).map do |n|
+  { :name => n.name.split(".").first }
+end
 tilecaches = search(:node, "roles:tilecache").reject { |n| Time.now - Time.at(n[:ohai_time]) > expiry_time }.sort_by(&:name).map do |n|
   { :name => n.name.split(".").first, :interface => n.interfaces(:role => :external).first[:interface].tr(".", "_") }
 end