1 default[:hardware][:modules] = if node[:lsb][:release].to_f >= 16.04
7 default[:hardware][:grub][:cmdline] = %w[nomodeset]
8 default[:hardware][:sensors] = {}
10 default[:hardware][:mcelog][:enabled] = node[:lsb][:release].to_f < 18.04
12 if node[:dmi] && node[:dmi][:system]
13 case node[:dmi][:system][:manufacturer]
15 default[:apt][:sources] |= ["management-component-pack"]
17 case node[:dmi][:system][:product_name]
18 when "ProLiant DL360 G6", "ProLiant DL360 G7"
19 default[:hardware][:sensors][:"power_meter-*"][:power][:power1] = { :ignore => true }
24 if Chef::Util.compare_versions(node[:kernel][:release], [3, 3]).negative?
25 default[:hardware][:modules] |= ["microcode"]
27 if node[:cpu][:"0"][:vendor_id] == "GenuineIntel"
28 default[:hardware][:modules] |= ["coretemp"]
32 if node[:kernel] && node[:kernel][:modules]
33 raidmods = node[:kernel][:modules].keys & %w[cciss hpsa mptsas mpt2sas mpt3sas megaraid_mm megaraid_sas aacraid]
35 default[:apt][:sources] |= ["hwraid"] unless raidmods.empty?
38 if node[:kernel][:modules].include?("ipmi_si")
39 default[:hardware][:modules] |= ["ipmi_devintf"]
42 if File.exist?("/proc/xen")
43 default[:hardware][:watchdog] = "xen_wdt"
44 elsif node[:kernel][:modules].include?("i6300esb")
45 default[:hardware][:watchdog] = "none"