logo       

Re: Template Nodes considered harmful: msg#00228

sysutils.puppet.user

Subject: Re: Template Nodes considered harmful

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 17 October 2007, Digant C Kasundra wrote:
> --On Tuesday, October 16, 2007 9:28 AM -0500 Luke Kanies <luke@xxxxxxxxxxx>
>
> wrote:
> >> As shown in the example, this allows for site defaults and per-node
> >> overrides
> >> for variables which will be propagated to the genericwebserver.
> >
> > Note that this is still file-order dependent, unfortunately -- if
> > that class was already included elsewhere, then the variable override
> > won't take.
>
> Yeah, this is partly why we don't use variables and instead use definitions
> and override those definitions when needed, as Russ described.

So, you are using

| node muh {
| webserver{
| webserver:
| var1=>val1,
| var2=>val2
| }
| }
| define webserver($var1, $var2) { include webserver }

where I would write

| node muh {
|
| $var1=val1
| $var2=val2
|
| include webserver
| }

Are you (planning on) using the external node support?


Regards, David
- --
The primary freedom of open source is not the freedom from cost, but the free-
dom to shape software to do what you want. This freedom is /never/ exercised
without cost, but is available /at all/ only by accepting the very different
costs associated with open source, costs not in money, but in time and effort.
- -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHHJYT/Pp1N6Uzh0URArctAJ9huAaWfQh/WRn17ssQnwjSOG/umACgodMr
na3HzL69znTW3AwZaTvYGUs=
=nGYV
-----END PGP SIGNATURE-----


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise