diff --git a/spec/classes/nrpe_config_spec.rb b/spec/classes/nrpe_config_spec.rb index 51997a3..5d594e6 100644 --- a/spec/classes/nrpe_config_spec.rb +++ b/spec/classes/nrpe_config_spec.rb @@ -36,7 +36,7 @@ end case facts[:osfamily] - when 'Debian' + when 'Debian','Gentoo' it { is_expected.to contain_user('nagios').with_groups(%w[foo bar]) } else it { is_expected.to contain_user('nrpe').with_groups(%w[foo bar]) } diff --git a/spec/classes/nrpe_install_spec.rb b/spec/classes/nrpe_install_spec.rb index 5f49fa1..c175ac8 100644 --- a/spec/classes/nrpe_install_spec.rb +++ b/spec/classes/nrpe_install_spec.rb @@ -14,6 +14,9 @@ when 'Debian' it { is_expected.to contain_package('nagios-nrpe-server').with_ensure('installed') } it { is_expected.to contain_package('nagios-plugins').with_ensure('installed') } + when 'Gentoo' + it { is_expected.to contain_package('net-analyzer/nrpe').with_ensure('installed') } + it { is_expected.to contain_package('net-analyzer/nagios-plugins').with_ensure('installed') } else it { is_expected.to contain_package('nrpe').with_ensure('installed') } it { is_expected.to contain_package('nagios-plugins-all').with_ensure('installed') } diff --git a/spec/defines/command_spec.rb b/spec/defines/command_spec.rb index 7bc3783..60a0451 100644 --- a/spec/defines/command_spec.rb +++ b/spec/defines/command_spec.rb @@ -23,6 +23,12 @@ 'mode' => '0644' ).that_requires(['Package[nagios-nrpe-server]']) } + when 'Gentoo' + it { + is_expected.to contain_file('/etc/nagios/nrpe.d/check_users.cfg').with( + 'mode' => '0644' + ).that_requires(['Package[net-analyzer/nrpe]']) + } else it { is_expected.to contain_file('/etc/nrpe.d/check_users.cfg').with( diff --git a/spec/defines/plugin_spec.rb b/spec/defines/plugin_spec.rb index c90af85..0c531b7 100644 --- a/spec/defines/plugin_spec.rb +++ b/spec/defines/plugin_spec.rb @@ -19,6 +19,8 @@ case facts[:osfamily] when 'Debian' it { is_expected.to contain_file('/usr/lib/nagios/plugins/check_users').that_requires('Package[nagios-nrpe-server]') } + when 'Gentoo' + it { is_expected.to contain_file('/usr/lib/nagios/plugins/check_users').that_requires('Package[net-analyzer/nrpe]') } else it { is_expected.to contain_file('/usr/lib64/nagios/plugins/check_users').that_requires('Package[nrpe]') } end