]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/recipes/default.rb
Don't rely on ohai hardware plugin having been run
[chef.git] / cookbooks / munin / recipes / default.rb
index 3b41eb8e9c52d58a29ee89d42da26fd2b6933291..1b4ae6d75d857346292d4eb89a4170cba741e7d1 100644 (file)
@@ -162,7 +162,7 @@ end
 
 node[:network][:interfaces].each do |ifname, ifattr|
   if ifattr[:encapsulation] == "Ethernet" && ifattr[:state] == "up"
-    if node[:hardware][:network][ifname][:device] =~ /^virtio/
+    if node[:hardware] && node[:hardware][:network][ifname][:device] =~ /^virtio/
       munin_plugin_conf "if_#{ifname}" do
         template "if.erb"
         variables :ifname => ifname