]> git.openstreetmap.org Git - chef.git/commitdiff
Only try and restart munin-node if the munin recipe is applied
authorTom Hughes <tom@compton.nu>
Wed, 26 Oct 2016 22:10:05 +0000 (23:10 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 26 Oct 2016 22:10:05 +0000 (23:10 +0100)
Fixes #80

cookbooks/munin/resources/plugin.rb

index d8861fafefdda145195f5d375a0a8460baf94009..5b93b8dea257a0fb662a67bd37a072abd77546b4 100644 (file)
@@ -28,5 +28,5 @@ attribute :conf_variables, :kind_of => Hash, :default => {}
 attribute :restart_munin, :kind_of => [TrueClass, FalseClass], :default => true
 
 def after_created
-  notifies :restart, "service[munin-node]" if restart_munin
+  notifies :restart, "service[munin-node]" if restart_munin && node[:recipes].include?("munin")
 end