I solved the duplicate definition error with virtual resources and realize.
I have a base class base::packages which lists every package I could want as
a virtual resource i.e.

@package{"mod_ssl":
   provider => yum,
  ensure => present
}

This class is included for every host and when ever I need to make sure a
package is installed I just have to realize it

realize(Package["mod_sll"])

and puppet with let you do that as many times as you want without throwing
any errors.

--dn

On Tue, Feb 2, 2010 at 4:20 PM, Ben Beuchler <[email protected]> wrote:

> I'm building modules for the various web services I manage and I'm
> running into trouble in defining the dependencies.  For example, two
> of my services require the same Apache module.  If I define the
> package resource in both modules and then try to include them both on
> a single node, I get a "Duplicate definition" error.  I can avoid this
> by defining a class that just contains the single package definition
> and including the class in both services, but that seems clunky.
>
> I feel I must be missing an obvious solution...  Any recommendations?
>
> -Ben
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 

--dn
http://www.cordump.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to