From 0a97a0dc8db53359fee0af041c4608a212b0c30f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 27 Oct 2016 09:29:03 +0100 Subject: [PATCH] Don't rely on ohai hardware plugin having been run --- cookbooks/munin/recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 3b41eb8e9..1b4ae6d75 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -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 -- 2.43.2