X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/a9f84d3b2526857bb3eb067ac94aea53c1954f4d..7597a132a268c2d7d1ff02a2e5c5a88d46895454:/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 536377de4..b6064b384 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -403,9 +403,11 @@ Ohai.plugin(:Hardware) do end devices[:disks].each do |disk| - if location = disks.find_index(disk[:location]) - disk[:smart_device] = "cciss,#{location}" - end + controller = disk[:controller] + + next unless devices[:controllers][controller][:type] == "hp" + + disk[:smart_device] = "cciss,#{disks.find_index(disk[:location])}" if disk[:status] == "Failed" disk[:status] = "failed"