]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Fix rubocop warnings
[chef.git] / cookbooks / hardware / recipes / default.rb
index 4710e5ef5494675d2c62c457af84453cc00443a9..41eae5a5b63c245888978d7fcbb9df6487c87ab9 100644 (file)
@@ -424,7 +424,7 @@ if disks.count.positive?
   # an Areca controller as they only allow one thing to
   # talk to the controller at a time and smartd will
   # throw errors if it clashes with munin
-  disks = disks.reject { |disk| disk[:smart] && disk[:smart].start_with?("areca,") }
+  disks = disks.reject { |disk| disk[:smart]&.start_with?("areca,") }
 
   disks.each do |disk|
     munin_plugin "smart_#{disk[:munin]}" do