On Wednesday, April 2, 2014 4:57:39 AM UTC-5, David Portabella wrote:
>
> Oh My God!
>
> you mean that "it's not a bug, it is a feature" ?
>
>

It is not a feature in the sense of a desired outcome, but it *is* the 
intended behavior.  Specifically, if there is any parameterized-style 
declaration of a given class, then that must be the first declaration of 
that class that is evaluated during catalog compilation.  This is analogous 
to the prohibition on duplicate resource declarations (and note that as a 
corollary it prohibits multiple parameterized-style declarations of the 
same class).  Declarations via "include", "require", or "contain" may be 
evaluated subsequent to a parameterized-style declaration, however, because 
in that context they do not influence the class's parameter values.

I characterize it as a design flaw in Puppet's parameterized-style class 
declaration syntax, and based on this issue I have been urging people to 
avoid parameterized classes ever since they were first introduced.  The 
situation is somewhat eased in modern (3.x) Puppet, however, where you can 
leverage hiera to use parameterized classes without the parameterized 
syntax.  These days I advise people only to avoid parameterized-style 
declaration syntax (for classes), not necessarily to avoid parameterized 
classes altogether.


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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0e1a2327-d741-4565-97e3-c3f3fa19f591%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to