On Nov 28, 8:45 am, Boudewijn Ector <beh...@boudewijnector.nl> wrote:

> At my company, we've been trying to get puppet to run properly for
> quite some time and it really looks great... except for using external
> recipes using parameters etc.
>
> Let me explain the problem:
>
> [...] I'm very interested in using the parametrised modules/
> classes which everybody seems to use .


You do realize that "Everybody is doing it" is one of the
stereotypically terrible reasons for doing anything, right?

You should deploy parameterized classes only when and where you decide
that they provide the best available solution to a specific problem
you are facing.  In making such evaluations, you should account for
the following considerations:

1) Class parameterization's key purpose is to solve an historical
Puppet problem involving the (dynamic) scope of variable names.  If
you are running Puppet 2.7 now, and it is not warning you about
resolving variable names via dynamic scope, then you do not have that
problem.

2) Parameterized classes do not serve well in some capacities where
unparameterized ones do:
2a) they cannot safely be included more than once in the same catalog
2b) they are usually unsuited for subclassing
2c) they are messy to use where one class includes another, especially
when such inclusions are chained.

3) There are alternatives to parameterization for feeding data to your
classes:
3a) global variables, including node facts
3b) (other-) class variables
3c) external data (i.e. extlookup() or hiera)

4) Contrary to your perception, not everybody uses or even likes class
parameterization

5) On the other hand, if you intend to use run stages (another
convenience feature for which there are alternatives), then you may as
well give in to the dark side now.  You will have many of the problems
attending class parameterization for every class that you explicitly
assign to a stage, whether those classes are explicitly parameterized
or not.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to