On 20/07/10 08:06 AM, Tore wrote:
> Hi,
> 
> We currently have a module `nagios` which install nrpe and nagios
> plugins for all nodes. The default node have this module included.
> 
> Currently we have a customer who wants to monitor their own services.
> We will still monitor them, but they want to do their own checks, fair
> enough.
> 
> How would you do this? This is what I have now:
> 
> node default {
> [...]
>    include nagios
>    $nagios_allowed_hosts = ["ip1", "ip2"]
> [...]
> }
> 
> But we don't want to add their source IP to this list, so thought this
> would do:
> Keep current default node, add this:
> 
> node special_customer inherits default {
>     $nagios_allowed_hosts += "ip"
> }
> 
> And then inherit all of their nodes from this rather than default.
> 

It may look a bit nasty but you could possibly do it with a global variable:

$nagios_allowed_hosts = ['ip1', 'ip2']

node default {
    import nagios
    // ...
}

node special_customer inherits default {
    $nagios_allowed_hosts += ['ip3']
}

-- 
Gabriel Filion

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to