]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/resources/plugin.rb
Give GHA explicit package read permission
[chef.git] / cookbooks / munin / resources / plugin.rb
index 01bf9167ea956614df895391df5ada5d92be502c..10c149436b7c79d96b59a738eeb39e1d22c51326 100644 (file)
 # limitations under the License.
 #
 
+unified_mode true
+
 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 +39,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 +54,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 +83,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