On Monday, October 28, 2013 11:03:09 AM UTC-5, [email protected] wrote:
>
> I am currently in the process of cleaning up some of my puppet config 
> files in particular some user and some virtual templates:
>
> I get the following error:
>
> *"err: Could not retrieve catalog from remote server: Error 400 on 
> SERVER: Duplicate definition: Group[testgroup] is already defined in file 
> /etc/puppet/manifests/templates/accounts.pp at line 22; cannot redefine at 
> /etc/puppet/manifests/templates/accounts.pp:22 on node 
> puppettest.test.internal"*
>
>

The declarations appearing directly in a defined type's body are issued 
once for each declared instance of that defined type.  No resource may be 
declared more than once.  Thus every resource declared by a defined type 
instance must be specific to that instance.  Resources shared between 
instances, such as a common Group, must be factored out.

One possible approach here would be to issue virtual declarations of all 
possible groups in some central class, and then have your accounts::virtual 
definition realize the appropriate group instead of declaring it.


John

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2c19fa5e-28ef-41ea-9a88-a0a3fd192b3f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to