On 12 July 2013 15:45, Christian Flamm <christian.le.fl...@gmail.com> wrote:

>
> My question: How is that different, more convenient or more flexible than
> extracting that admin user into its own module?
>

I guess the main advantage is one of containing the knowledge of that user
into the thing that needs to know about it.  i.e. the mailserver and
webserver modules know that they need that user in order to manage other
resources (e.g. install a package/start a service).  By splitting it out
the way you have in your second example, something/someone else needs to
know/remember that because node x has module y declared, it also needs
module z to be declared too.  That fact is really internal to the other two
modules, so shouldn't need to be exposed at the node level.

I guess the corollary is; if your webserver module declares a package and a
service resource, why don't you split those out into separate modules?  You
probably wouldn't, right, because they're closely related?  Well, nor
should you split the user out into a separate module.  If it so happens
that 2 modules need to ensure a particular resource is declared, doing so
via the virtual resource functionality is a reasonable way of doing that.

Regards,

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to