]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/resources/plugin.rb
Clean up notification handling for the munin LWRPs
[chef.git] / cookbooks / munin / resources / plugin.rb
index 5d36e13a5ac94b14d2c2cc86e3517789b8cd7d1b..d8861fafefdda145195f5d375a0a8460baf94009 100644 (file)
@@ -25,8 +25,8 @@ attribute :target, :kind_of => String
 attribute :conf, :kind_of => String
 attribute :conf_cookbook, :kind_of => String
 attribute :conf_variables, :kind_of => Hash, :default => {}
+attribute :restart_munin, :kind_of => [TrueClass, FalseClass], :default => true
 
-def initialize(*args)
-  super
-  notifies :restart, "service[munin-node]"
+def after_created
+  notifies :restart, "service[munin-node]" if restart_munin
 end