(Take all this with a grain of salt, perhaps I'm inexperiencedly rhubarbing on.)

You don't necessarily need to configure your packages in the same module that 
you install them in. You can have a generic module for installing packages, 
which is included by more specific configuration modules.

I wouldn't call it slick, but perhaps something like this module structure if 
you only use postfix for mx hosts?

postfix/
postfix/files
postfix/manifests
postfix/manifests/init.pp
# class postfix installs the postfix software
postfix/manifests/edgemx.pp
# class postfix::edgemx includes class postfix, installs spamassassin and does 
its own cf modifications for edge hosts running spamassassin
postfix/manifests/coremx.pp
# class postfix::coremx includes class postfix, and does its own cf 
modifications for core hosts running only spamassassin
postfix/manifests/clammx.pp
# class postfix::clammx includes class postfix, installs clamav, and does its 
own cf modifications for the clamav-using postfix hosts

If you have generic cf configs across all bits, they'd go in the base postfix 
class.

By contrast, something like this if it's more to your flavour:

postfix/manifests/init.pp
# installs postfix software (no configuration)
clamav/manifests/init.pp
# installs clamav (no configuration)
# spamassassin/manifests/init.pp (no configuration)
coremx/manifests/init.pp
# includes spamassassin and postfix classes, does postfix config specific to 
core hosts
edgemx/manifests/init.pp
# etc for edge hosts
clammx/manifests/init.pp
# etc for clamav hosts

Or possibly mix up the two, and so forth.


On Thu, Dec 01, 2011 at 10:49:00AM -0500, Peter Berghold wrote:
>    ... to invoke a template from multiple modules?� Here is what I mean:
> 
>    I have a module called "postfix" which handles the installation and base
>    configuration of the postfix MTA.� I have another module called
>    "spamassassin" which deals with the download and installation of the
>    Mail::SpamAssassin Perl module which incidently adds the init scripts for
>    SpamAssassin and the clamd binary.
> 
>    I'd like that spamassassin module to modify both the [1]master.cf and
>    [2]main.cf file of postfix to enable its own functionality.
> 
>    Rather than make SpamAssassin part of the postfix module I separated it
>    out since not all machines running postfix need to have the overhead of
>    SpamAssassin (eg. mailers behind the firewall that don't accept outside
>    email) but my border MX machines do.
> 
>    There's another module that needs to modify postfix's config files to be
>    enabled as well and that's the ClamAV module, I won't go into detail here.
> 
>    The problem I see is if each of them modify the configs, the postfix
>    module is going to remove the changes the other modules made.
> 
>    Is there a slick way of doing this?
> 
>    --
>    Peter L. Berghold
>    Owner, Shark River Technical Solutions LLC
> 
>    --
>    You received this message because you are subscribed to the Google Groups
>    "Puppet Users" group.
>    To post to this group, send email to puppet-users@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.
> 
> References
> 
>    Visible links
>    1. http://master.cf/
>    2. http://main.cf/

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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.

Reply via email to