On 4/2/14, 3:23 PM, jcbollinger wrote:
> 
> 
> 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

Agree with John that you want to completely avoid using the
parameterized style declaration of classes. Better to use 'include'
statements and set all of your params in Hiera.

Here's a link[1] to a talk I gave two years ago about this topic.

[1] - http://www.slideshare.net/gh/20130407-load-puppevtv3andhiera/17

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/533D6BEA.4070609%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to