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.