]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Add ohai plugin to gather additional hardward information
[chef.git] / cookbooks / hardware / recipes / default.rb
index b4986e70e34a6eba5b2b034e3c471ce0b526d275..5183978ff91bb52e97fe9bf343609544f36f67ac 100644 (file)
 include_recipe "tools"
 include_recipe "munin"
 
+ohai_plugin "hardware" do
+  template "ohai.rb.erb"
+end
+
 case node[:cpu][:"0"][:vendor_id]
 when "GenuineIntel"
   package "intel-microcode"
@@ -307,7 +311,7 @@ if status_packages["cciss-vol-status"] && File.exist?("/usr/sbin/cciss_vol_statu
   end
 end
 
-if status_packages["megaclisas-status"]
+if status_packages["megaclisas-status"] && File.exist?("/usr/sbin/megacli")
   controller = 0
 
   Dir.glob("/sys/class/scsi_host/host*") do |host|