Re: [Puppet Users] module organisation

Roy Nielsen
Wed, 16 Jun 2010 16:03:02 -0000

Hello,

You might consider having an "ono" environment, and
"webserver" and
"mailserver" modules...

Regards,
-Roy

On 6/16/10 9:56 AM, Stefan Schlesinger wrote:
> 	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