From: Tom Hughes Date: Sun, 19 Nov 2017 20:58:08 +0000 (+0000) Subject: Fix munin_plugin resource X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/19cd4f4f9b9ffa31a4b5e2bd2abaed1267531fd5 Fix munin_plugin resource --- diff --git a/cookbooks/munin/resources/plugin.rb b/cookbooks/munin/resources/plugin.rb index f62f2ac57..876468f4d 100644 --- a/cookbooks/munin/resources/plugin.rb +++ b/cookbooks/munin/resources/plugin.rb @@ -68,10 +68,10 @@ action_class do def target_path if ::File.exist?(target) target - elsif ::File.exist?("/usr/local/share/munin/plugins/#{new_resource.target}") - "/usr/local/share/munin/plugins/#{new_resource.target}" - elsif ::File.exist?("/usr/share/munin/plugins/#{new_resource.target}") - "/usr/share/munin/plugins/#{new_resource.target}" + elsif ::File.exist?("/usr/local/share/munin/plugins/#{target}") + "/usr/local/share/munin/plugins/#{target}" + elsif ::File.exist?("/usr/share/munin/plugins/#{target}") + "/usr/share/munin/plugins/#{target}" end end