logo       

Re: Template Nodes considered harmful: msg#00276

sysutils.puppet.user

Subject: Re: Template Nodes considered harmful

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

On Friday 26 October 2007, David Lutterkort wrote:
> On Wed, 2007-10-24 at 12:20 -0500, Luke Kanies wrote:
> > > (20:16:21) sheeri: certainly I can see the need for something being
> > > both
> > > a "webserver" and a "dbserver".......which I'd think multiple
> > > inheritance
> > > would be the way to go
> >
> > Inheritance only makes sense when you're talking about one class
> > needing to modify another class, which is generally not the case.
>
> The point of the above (or at list the pointy end I've run into) is that
> you may want to create a class 'fooserver' by combining 'webserver' and
> 'dbserver', and give people the opportunity to modify resources coming
> from either. That's not possible with single inheritance.

The following is legal and will work as one could expect:


class fooserver {
include webserver
include dbserver
}

class webserver::without_frills {
Frills["web2.0"] { ensure => absent }
}

node 'nofrills.org' {
include fooserver
include webserver::without_frills
}


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)

iD8DBQFHIhkr/Pp1N6Uzh0URAh6xAJ9ok7vTv/aB4mXkTDgac8zJ7rgqVwCffkS3
qUfNpuK7n9b53p/WWDF7I5Y=
=jxPy
-----END PGP SIGNATURE-----


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

News | FAQ | advertise