voxpupuli / puppet-nrpe

Puppet module for NRPE
http://forge.puppetlabs.com/puppet/nrpe
Apache License 2.0
2 stars 14 forks source link

Error when package_name is customized #41

Closed couloum closed 4 years ago

couloum commented 4 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

  class { 'nrpe':
    package_name => 'nagios-nrpe-server',
  }

  nrpe::plugin { 'check_foobar':
    ensure => present,
    source => 'puppet:///modules/mymodule/check_foobar',
  }

What are you seeing

Puppet agent fail with catalog compilation error.

What behaviour did you expect instead

Puppet agent running correctly.

Output log

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not find resource 'Package[nagios-plugins]' in parameter 'require' (file: /etc/puppetlabs/code/environments/production/modules/nrpe/manifests/plugin.pp, line: 18) on node mynode

Any additional information you'd like to impart

I changed package_name as a workarround of issue #35.

The issue seems that nrpe::plugin::package_name does not get the value of nrpe::package_name

alexjfisher commented 4 years ago

There hasn't been a require on line 18 since version 2.1.1. https://github.com/voxpupuli/puppet-nrpe/blob/05aa5f11f0d1f65fd33b33b506679e540ab0476a/manifests/plugin.pp#L18

couloum commented 4 years ago

Sorry, for the bad issue report. I was indeed running an old version of the module, while I thought I had updated it. Sorry again for the trouble and thanks for the comment.