From: Tom Hughes Date: Wed, 2 Jan 2019 18:54:12 +0000 (+0000) Subject: Record spun up status consistently X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/04684b0513bd087ab3e616d53e40be41fce125b1?hp=5b06782fb9ac3ba77b39f8c5f2a98590479885c2 Record spun up status consistently --- diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index 074f5cbf6..82194acf2 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -444,8 +444,8 @@ Ohai.plugin(:Hardware) do when "Online" then disk[:status] = "online" when "Hotspare" then disk[:status] = "hotspare" when "Failed" then disk[:status] = "failed" - when "Spun Up" then disk[:spun_down] = false - when "Spun down" then disk[:spun_down] = true + when "Spun Up" then disk[:state] = "spun_up" + when "Spun down" then disk[:state] = "spun_down" end end elsif disk && line =~ /^(\S.*\S)\s*:\s+(\S.*)$/