From: Tom Hughes Date: Fri, 9 Dec 2016 09:15:53 +0000 (+0000) Subject: Avoid errors during bootstrap X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/60a12a49647bbc8893d741c57a07ed6206c111cb Avoid errors during bootstrap --- diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 1b4ae6d75..39085f0e2 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -162,7 +162,9 @@ end node[:network][:interfaces].each do |ifname, ifattr| if ifattr[:encapsulation] == "Ethernet" && ifattr[:state] == "up" - if node[:hardware] && node[:hardware][:network][ifname][:device] =~ /^virtio/ + if node[:hardware] && + node[:hardware][:network] && + node[:hardware][:network][ifname][:device] =~ /^virtio/ munin_plugin_conf "if_#{ifname}" do template "if.erb" variables :ifname => ifname