]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/resources/plugin_conf.rb
Use inline compile mode for munin LWRPs
[chef.git] / cookbooks / munin / resources / plugin_conf.rb
index 88b453d9a695c269f78057a1a61a797ce9abd292..e4b99965db78ee7d8e7c8399e8b40dacee2b960b 100644 (file)
@@ -24,3 +24,12 @@ 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 => {}
+
+def initialize(*args)
+  super
+  begin
+    resources(:service => "munin-node").subscrbes(:restart, self)
+  rescue Chef::Exceptions::ResourceNotFound
+    # Ignore
+  end
+end