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] &&
+ node[:hardware][:network][ifname][:device] =~ /^virtio/
munin_plugin_conf "if_#{ifname}" do
template "if.erb"
variables :ifname => ifname
sensors_volt = true unless Dir.glob("#{hwmon}/in*_input").empty?
end
-if sensors_fan || sensors_temp || sensors_volt
- package "lm-sensors"
-end
+package "lm-sensors" if sensors_fan || sensors_temp || sensors_volt
if sensors_fan
munin_plugin "sensors_fan" do