diff --git a/attributes/default.rb b/attributes/default.rb index e6156ea..311d914 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -89,6 +89,7 @@ default['nrpe']['check_action'] = 'restart' end default['nrpe']['install_method'] = 'package' + default['nrpe']['install_yum-epel'] = true default['nrpe']['pid_file'] = '/var/run/nrpe.pid' default['nrpe']['packages'] = %w(nrpe nagios-plugins-disk nagios-plugins-load nagios-plugins-procs nagios-plugins-users) if node['kernel']['machine'] == 'i686' diff --git a/recipes/_package_install.rb b/recipes/_package_install.rb index dc21816..25ab610 100644 --- a/recipes/_package_install.rb +++ b/recipes/_package_install.rb @@ -23,7 +23,7 @@ # nrpe packages are available in EPEL on rhel / fedora platforms # fedora 17 and later don't require epel -if platform_family?('rhel', 'fedora') +if platform_family?('rhel', 'fedora') && node['nrpe']['install_yum-epel'] unless platform?('fedora') && node['platform_version'].to_i > 16 include_recipe 'yum-epel' end