logo       

Re: Template Nodes considered harmful: msg#00229

sysutils.puppet.user

Subject: Re: Template Nodes considered harmful

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

On Tuesday 16 October 2007, Luke Kanies wrote:
> On Oct 16, 2007, at 4:35 AM, David Schmitt wrote:
> > MY proposed solution is to change all template nodes into template
> > classes and
> >
> > instead of inheritance use inclusion:
> > | class genericwebserver { stuff }
> > |
> > | $influence_genericwebserver = "site default"
> > |
> > | node 'web01.example.com' {
> > | $influence_genericwebserver = "node specific override"
> > | include genericwebserver
> > | }
> >
> > 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.

I would have hoped, that this can be mostly circumvented by using external
node support, which my node-configuration style is modelled after. This would
set the relevant variables before any class can be included. Also the
variables from the script could - theoretically - be made readonly like
facts, which would make them "safe" for usage classes.

David Escala called my attention on IRC today on the fact that variables set
via external nodes seem to be set on node scope and not really global. (See
also the thread "client update to 0.23.2: "Could not find value for""). This
makes the whole thing a bit confusing.




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)

iD8DBQFHHJkn/Pp1N6Uzh0URAhhtAJ9Io/Kp5irRBxT6nKQqMoyjK0UiggCeOmOP
xYLWHPz8X3iDJDzqdniAQtA=
=BSEj
-----END PGP SIGNATURE-----


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

News | FAQ | advertise