Dear John,

Thanks a lot for your response. I found where was the problem and I have it 
working.

The solituion consist in always declare shorewall as the last class and you 
can write erb template as my first example and will work.

I wanted to thank you for all you help and time.

So finally my conclusion is that when you declase a node, includes order 
matters.

El martes, 19 de febrero de 2013 17:48:27 UTC+1, jcbollinger escribió:
>
>
>
> On Tuesday, February 19, 2013 10:21:47 AM UTC-6, jcbollinger wrote:
>>
>>
>> The most essential part of my suggestion was that the "include firewall" 
>> be parsed *after* "include $service_modules".  The example code achieves 
>> that by putting the former after the latter in the same node block.  
>> Putting the two in different node blocks, with the latter's inheriting from 
>> the former's, on the other hand, ensures the opposite (i.e. wrong) parse 
>> order.
>>
>>
> Hmm.  My recollection of what was going on here was faulty, and in fact 
> that was not the essential point at all.  Indeed, the whole idea was that 
> class declaration order could be made to not matter.  As a corollary, how 
> class declarations are split among node blocks in a node inheritance chain 
> can be made not to matter either.
>
> If something like my suggestion worked when all the classes were declared 
> in the same node block, but not when they were split up as described, then 
> I would guess that you omitted the declaration of the $service_modules 
> variable in your 'firewall' class.  If you then declare that class in a 
> node block where a variable of the same name has been declared (including 
> in a base node), then the class will draw on the node variable.  Otherwise, 
> the value is empty.
>
> Note in particular that declaring a class in the base node and setting a 
> variable in a child node does not make the variable visible to that class.  
> Node inheritance does not inject the inheriting node's variables into the 
> scope of the inherited node.
>
>
> John
>
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to