[Puppet Users] Re: Variable scopes and overriding

2011-02-26 Thread Nick Fagerlund
Hey, Mohamed. Nan's got a good suggestion; I' Alternately, you could do this: node default { include $perhost_module # Do nothing else. } class some_host_module { $auth_aaa = something $other_variable = something include class_that_includes_everything } class

[Puppet Users] Re: Variable scopes and overriding

2011-02-26 Thread Nick Fagerlund
Dammit, I hit send by accident. Anyway, the point of this is that Nan's method is still doing lookup across classes instead of strictly controlling the parent scopes, and I think building this as a strict cascade where everything only looks to its direct parent is going to get you closer to

Re: [Puppet Users] Re: Variable scopes and overriding

2011-02-26 Thread Mohamed Lrhazi
Fantastic. Thank you very much guys. On Sat, Feb 26, 2011 at 3:42 PM, Nick Fagerlund nick.fagerl...@puppetlabs.com wrote: Dammit, I hit send by accident.  Anyway, the point of this is that Nan's method is still doing lookup across classes instead of strictly controlling the parent scopes, and

[Puppet Users] Re: Variable scopes and overriding

2011-02-25 Thread Nick Fagerlund
Yeah, that's probably not going to get you where you need to be. Scope in Puppet goes like this: * When you declare a variable in a scope, it is local to that scope. * Every scope has one and only one parent scope. * If it's a class or node that inherits from a base class/node, its parent

Re: [Puppet Users] Re: Variable scopes and overriding

2011-02-25 Thread Mohamed Lrhazi
Thanks a lot Nick for the detailed response. Not sure I fully understand yet. I dont think I can use option one because the external classifier would does not have access to the clients facts. I will read about parametrized classes and learn to use them, though I dont yet see how they can solve my

Re: [Puppet Users] Re: Variable scopes and overriding

2011-02-25 Thread Nan Liu
On Fri, Feb 25, 2011 at 3:25 PM, Mohamed Lrhazi lrh...@gmail.com wrote: Thanks a lot Nick for the detailed response. Not sure I fully understand yet. I dont think I can use option one because the external classifier would does not have access to the clients facts. I will read about