]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/recipes/default.rb
Update formatting of header comments
[chef.git] / cookbooks / munin / recipes / default.rb
index df7bfbe08df52e67aacd622f97f791c4e3f43616..ac1464a979ab302d8510dab81b7b16f54c11e951 100644 (file)
@@ -1,8 +1,8 @@
 #
 #
-# Cookbook Name:: munin
+# Cookbook:: munin
 # Recipe:: default
 #
 # Recipe:: default
 #
-# Copyright 2010, OpenStreetMap Foundation
+# Copyright:: 2010, OpenStreetMap Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -160,7 +160,7 @@ munin_plugin "http_loadtime" do
 end
 
 node[:network][:interfaces].each do |ifname, ifattr|
 end
 
 node[:network][:interfaces].each do |ifname, ifattr|
-  if ifattr[:flags].include?("UP") && !ifattr[:flags].include?("LOOPBACK")
+  if ifattr[:flags]&.include?("UP") && !ifattr[:flags].include?("LOOPBACK")
     if node[:hardware] &&
        node[:hardware][:network] &&
        node[:hardware][:network][ifname][:device] =~ /^virtio/
     if node[:hardware] &&
        node[:hardware][:network] &&
        node[:hardware][:network][ifname][:device] =~ /^virtio/