On Wed, Jun 16, 2010 at 8:56 AM, Stefan Schlesinger <s...@ono.at> 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.
It looks to me like you should do something like: class exim::complex inherits exim::simple { ... } overriding ::simple resources appropriately and defining any required new resources, and then include exim::complex for that node, and exim::simple for every node? > > 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 ////////////////////////////////////////// /////// > s...@ono.at +43.676.4911123 > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.