]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/resources/plugin_conf.rb
Clean up notification handling for the munin LWRPs
[chef.git] / cookbooks / munin / resources / plugin_conf.rb
index 88b453d9a695c269f78057a1a61a797ce9abd292..e47b1336ba5ed4e075bbebc35ad8dc5d018fc491 100644 (file)
@@ -24,3 +24,8 @@ attribute :name, :kind_of => String, :name_attribute => true
 attribute :cookbook, :kind_of => String
 attribute :template, :kind_of => String, :required => true
 attribute :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
+end