You cannot automatically pass parameters to defines with hiera. But, if you
put the nrpe::commands in a profile, you can do APL that way. I.e.
class profile::something (
$ntpserver,
) {
nrpe::command {'check_ntp':
package_name => 'nagios-plugins-ntp',
ensure => present,
command => "check_ntp -H $ntpserver";
}
}
In your hiera data, add this at the right tier:
profile::something::ntpserver: 127.0.0.1
You can have specific classes for each check, or a giant nrpe profile that
includes all the commands. Just make all the variables you want to pass to
nrpe::command instances parameters of the class, and hiera can do the heavy
lifting. That should give you the best of both worlds.
Rob Nelson
[email protected]
On Thu, Apr 21, 2016 at 3:28 PM, Ugo Bellavance <[email protected]> wrote:
>
>
> On Thursday, April 21, 2016 at 3:25:35 PM UTC-4, Rob Nelson wrote:
>>
>> Can you link directly to the module you're using, on the forge or on
>> github?
>
>
> Sorry... https://github.com/pdxcat/puppet-module-nrpe or
> https://forge.puppet.com/pdxcat/nrpe
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/5cc2f9ab-4341-4769-9d08-274bab779d42%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/5cc2f9ab-4341-4769-9d08-274bab779d42%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CAC76iT-ZOmnvyz%2BuD%2By7wNES6YcASbajSku2KjS3ZqY8CiBZfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.