X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/db1258aa91142e37e5dcded368a25ec2c937f473..9bca5f05185dde08efcf2d5f1a2bf66c8cdc9f00:/cookbooks/hardware/libraries/sensors.rb diff --git a/cookbooks/hardware/libraries/sensors.rb b/cookbooks/hardware/libraries/sensors.rb index 0a55eae39..6508ffb7d 100644 --- a/cookbooks/hardware/libraries/sensors.rb +++ b/cookbooks/hardware/libraries/sensors.rb @@ -8,18 +8,11 @@ class Chef if attributes[:ignore] results << "ignore #{sensor}" else - if label = attributes[:label] - resuls << "label #{sensor} \"#{label}\"" - end - - if compute = attributes[:compute] - resuls << "compute #{sensor} #{compute}" - end + results << "label #{sensor} \"#{attributes[:label]}\"" if attributes[:label] + results << "compute #{sensor} #{attributes[:compute]}" if attributes[:compute] attribute_names.each do |name| - if value = attributes[name] - results << "set #{sensor}_#{name} #{value}" - end + results << "set #{sensor}_#{name} #{attributes[name]}" if attributes[name] end end end