X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/cb2c78c1445e99170521c1280d94c2b44f2220b7..eb10ee11cf967f641485a4124c337f52ce6b9939:/cookbooks/hardware/templates/default/ohai.rb.erb diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index 6e6e5f37e..b6064b384 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -403,6 +403,10 @@ Ohai.plugin(:Hardware) do end devices[:disks].each do |disk| + controller = disk[:controller] + + next unless devices[:controllers][controller][:type] == "hp" + disk[:smart_device] = "cciss,#{disks.find_index(disk[:location])}" if disk[:status] == "Failed"