]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Disable hddtemp_smartctl if we have rejected all disks
[chef.git] / cookbooks / hardware / recipes / default.rb
index bb7de4a98d1418510e7d67ef9ba1a38cc40cc75a..b4986e70e34a6eba5b2b034e3c471ce0b526d275 100644 (file)
@@ -452,18 +452,21 @@ if disks.count > 0
       conf_variables :disk => disk
     end
   end
+else
+  service "smartmontools" do
+    action [:stop, :disable]
+  end
+end
 
+if disks.count > 0
   munin_plugin "hddtemp_smartctl" do
     conf "munin.hddtemp.erb"
     conf_variables :disks => disks
   end
 else
-  service "smartmontools" do
-    action [:stop, :disable]
-  end
-
   munin_plugin "hddtemp_smartctl" do
     action :delete
+    conf "munin.hddtemp.erb"
   end
 end