[Puppet Users] module organisation

Stefan Schlesinger
Wed, 16 Jun 2010 15:56:06 -0000

Hello folks!

Since you cannot include modules twice, or overwrite anything
within a namespace, I''m looking for a way to organize my modules.

	I initially started to create the following structure, which
will avoid storing redundant configuration in your manifests:


node server01.ono.at { include servergroups::ono::webserver  }
node server02.ono.at { include servergroups::ono::webserver  }
node server03.ono.at { include servergroups::ono::webserver  }
node server04.ono.at { include servergroups::ono::mailserver }

class servergroups::ono::server
{
    include puppet::client
    include ssh::server
    include exim::minimal
}

class servergroups::ono::webserver inherits servergroups::ono::server
{
    include apache
    ...
}

class servergroups::ono::mailserver inherits servergroups::ono::server
{
    include exim::mx
    ...
}

But after having worked with this for a while now and putting more and
more configuration into Puppet, I hit the point where all servers would
want a certain service configuration (eg. a minimal exim configuration),
*except* for one, the mail server, which wants to include a much more
complex exim configuration.

So I''d like to know how others worked around such limitations,
whether there are any functions in Puppet I could use to work around
this issue,

or which other approaches I could take to reach the same goal - not
having to create a second "servergroups::ono::server" class for just
one server.


--
Stefan Schlesinger ////////////////////////////////////////// ///////
sts@ono.at                                            +43.676.4911123