Skip to content

Commit

Permalink
Fix check_writable installation not fully working.
Browse files Browse the repository at this point in the history
We were missing a dependency on the perl-Monitoring-Plugin package.

This also improves things so we don't try to reinstall Module::Install
on every single Chef run.
  • Loading branch information
GUI committed Nov 1, 2016
1 parent a4eed20 commit 8c86cb9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion recipes/check_writable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@

include_recipe "opsview::client"
include_recipe "perl"
include_recipe "yum-epel"

package "perl-ExtUtils-MakeMaker"
package "perl-Monitoring-Plugin"
cpan_module "Data::Random"
cpan_module "Module::Install"
cpan_module "Module::Install" do
# cpan_module's default check to see if the module is installed doesn't
# properly detect this module, since it requires the module be included via
# "inc::Module::Install" instead of "Module::Install". So do a simple
# file-based check instead to prevent repeated installs.
not_if { ::File.exist?("/usr/local/share/perl5/Module/Install.pm") }
end

# http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_writable/details
remote_file "#{Chef::Config[:file_cache_path]}/check_writable-#{node[:opsview][:check_writable][:version]}.tar.gz" do
Expand Down

0 comments on commit 8c86cb9

Please sign in to comment.