]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/resources/plugin.rb
Merge branch 'patch-2' of https://github.com/Tigerfell/chef into pr257
[chef.git] / cookbooks / munin / resources / plugin.rb
index 1fcff4c057a8ba744dd28266acf64447da83c2fe..bc58bf9751df3cd0b2ce6a07386883f5a54a1e73 100644 (file)
@@ -1,8 +1,8 @@
 #
-# Cookbook Name:: munin
+# Cookbook:: munin
 # Provider:: munin_plugin
 #
-# Copyright 2013, OpenStreetMap Foundation
+# Copyright:: 2013, OpenStreetMap Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
 
 default_action :create
 
-property :plugin, :kind_of => String, :name_attribute => true
+property :plugin, :kind_of => String, :name_property => true
 property :target, :kind_of => String
 property :conf, :kind_of => String
 property :conf_cookbook, :kind_of => String
@@ -37,7 +37,7 @@ action :create do
     to target_path
   end
 
-  if new_resource.conf # ~FC023
+  if new_resource.conf
     munin_plugin_conf new_resource.plugin do
       cookbook new_resource.conf_cookbook
       template new_resource.conf
@@ -52,7 +52,7 @@ action :delete do
     action :delete
   end
 
-  if new_resource.conf # ~FC023
+  if new_resource.conf
     munin_plugin_conf new_resource.plugin do
       action :delete
       restart_munin false
@@ -81,5 +81,5 @@ action_class do
 end
 
 def after_created
-  notifies :restart, "service[munin-node]" if restart_munin && node[:recipes].include?("munin")
+  notifies :restart, "service[munin-node]" if restart_munin
 end