]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/resources/plugin_conf.rb
Make the rrddump.sh script do all the work, including cleanup.
[chef.git] / cookbooks / munin / resources / plugin_conf.rb
index 88b453d9a695c269f78057a1a61a797ce9abd292..ce4c80739ad5779ec550baa78bfaa722391808b2 100644 (file)
@@ -21,6 +21,11 @@ actions :create, :delete
 default_action :create
 
 attribute :name, :kind_of => String, :name_attribute => true
-attribute :cookbook, :kind_of => String
+attribute :cookbook, :kind_of => [String, nil]
 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