]> git.openstreetmap.org Git - chef.git/commitdiff
Fix foodcritic warning
authorTom Hughes <tom@compton.nu>
Tue, 18 Oct 2016 09:22:16 +0000 (10:22 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 18 Oct 2016 09:22:16 +0000 (10:22 +0100)
cookbooks/hardware/recipes/default.rb

index 35e31ea2e2fc3d644e78dcba19f7c1434aaf714b..1308f44fcfac3a5fa2bd68021af0f6c6edbbd707 100644 (file)
@@ -78,19 +78,10 @@ end
 
 # Remove legacy HP G4 support which breaks modern hp-health 10.4
 if manufacturer == "HP"
-  file "/opt/hp/hp-health/bin/hpasmd" do
-    action :delete
-  end
-  file "/usr/lib/libhpasmintrfc.so.3.0" do
-    action :delete
-  end
-
-  file "/usr/lib/libhpasmintrfc.so.3" do
-    action :delete
-  end
-
-  file "/usr/lib/libhpasmintrfc.so" do
-    action :delete
+  %w(/opt/hp/hp-health/bin/hpasmd /usr/lib/libhpasmintrfc.so.3.0 %/usr/lib/libhpasmintrfc.so.3 /usr/lib/libhpasmintrfc.so).each do |filename|
+    file filename do
+      action :delete
+    end
   end
 
   directory "/opt/hp/hp-legacy" do