]> git.openstreetmap.org Git - chef.git/blob - cookbooks/hardware/attributes/default.rb
Install raid tools for MegaRAID and AACRaid cards
[chef.git] / cookbooks / hardware / attributes / default.rb
1 if node[:dmi] and node[:dmi][:system]
2   case dmi.system.manufacturer
3   when "HP"
4     if node[:lsb][:release].to_f <= 11.10
5       default[:apt][:sources] |= [ "proliant-support-pack" ]
6     else
7       default[:apt][:sources] |= [ "management-component-pack" ]
8     end
9   end
10 end
11
12 if node[:kernel] and node[:kernel][:modules]
13   if node[:kernel][:modules].include?("mpt2sas")
14     default[:apt][:sources] |= [ "hwraid" ]
15   end
16
17   if node[:kernel][:modules].include?("megaraid_sas")
18     default[:apt][:sources] |= [ "hwraid" ]
19   end
20
21   if node[:kernel][:modules].include?("aacraid")
22     default[:apt][:sources] |= [ "hwraid" ]
23   end
24 end