FWIW When I hit this awhile ago I opened a bug
(http://projects.puppetlabs.com/issues/3720). Annoying, it was
rejected.

seph

Tore <tore.lo...@gmail.com> writes:

> I just realized that this wont work, since the variable allready is
> defined. The variable must also be defined before the include, since
> it is used by the module.
>
> One way to solve this would be creating a top node which contains
> vars, which is inhereted by a subnode which have includes, which again
> is inherited by nodes.
>
> node top {
>   vars[...]
> }
>
> node second inherits {
>   includes[...]
> }
>
> node 'actual-node.example.com' inherits seconds {
>
> }
>
> Then I could create a special tree for customers, which inherits the
> right one.
>
> Hm, while I'm writing this I see that maybe I should rather make
> classes out of this rather than using nodes for this. It would make
> more sense to make a class for variabels, then a class for includes,
> then I'm able to change variabels in the middle.
>
> Any toughts`?
>
>
> On 20 Jul, 14:06, Tore <tore.lo...@gmail.com> 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.
>>
>> What do you think?
>
> -- 
> 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.

-- 
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