]> git.openstreetmap.org Git - chef.git/blob - cookbooks/hardware/attributes/default.rb
473ceb1811249ac6922131b19aeab390ddd18ca0
[chef.git] / cookbooks / hardware / attributes / default.rb
1 default[:hardware][:sensors] = {}
2
3 if node[:dmi] and node[:dmi][:system]
4   case dmi.system.manufacturer
5   when "HP"
6     default[:apt][:sources] |= [ "management-component-pack" ]
7
8     case dmi.system.product_name
9       when "ProLiant DL360 G6", "ProLiant DL360 G7"
10         default[:hardware][:sensors][:power][:power1] = { :ignore => true }
11     end
12   end
13 end
14
15 if node[:kernel] and node[:kernel][:modules]
16   raidmods = node[:kernel][:modules].keys & ["cciss", "hpsa", "mptsas", "mpt2sas", "megaraid_mm", "megaraid_sas", "aacraid"]
17
18   unless raidmods.empty?
19     default[:apt][:sources] |= [ "hwraid" ]
20   end
21 end