> can any one explain this behavior ?

You define a package resource in your define. Everytime you manage a  
resource with this define also an instance of the package resource is  
managed, so you only need to manage two resources with this define and  
you end up with a duplicate definition.

As puppet tries to apply the same package resource definition twice  
you end up with a duplicate definition on the same line.

Solution: manage your package resource in its very own class and  
include this class into the define. This apply in general to every  
other managed resource in defines which are unique amongst the whole  
system. Which means that you don't differentiate it with an own  
deviated name, containing for examle $name of the define.

For an example have a look at:  
http://git.puppet.immerda.ch/?p=module-git.git;a=blob;f=manifests/clone.pp;h=1d6a298f985aa6b79851e31b4b63403d7b2f7a9b;hb=7b1f9a68e95cd9dc877145eda08c18e233603bb8

We include the class git, which will manage the package-resource git,  
hence we can reference to it in the deviated exec for this define.

cheers pete

--

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