Thanks for your answer Peter. I appreciate that.

   Yes, it's a really good idea, I did that before but it's kind of weird. 
Because while I'm developing more and more modules I have to change the 
module that contains a virtual resource, you know seems a little silly.

   And I was wondering for a different idea or explanation, because I can't 
understand why Puppet can't handle that situation.


Best regards.

~Pedro Cesar.
On Monday, September 8, 2014 10:09:02 AM UTC-3, Peter Bukowinski wrote:
>
> On Sep 8, 2014, at 8:31 AM, Pedro César <pedroc...@gmail.com <javascript:>> 
> wrote:
>
> I'm not sure if I'm doing right or something I've done is stupid, but I 
> have a question.
>
> I have multiple hosts and multiple modules to manage these hosts, but 
> eventually, I have same resources for different modules and the Puppet 
> complaint about it.
>
> I mean, I have two different modules that guarantee a folder be created, 
> one of those modules I use to couple hosts and another one I use for the 
> other hosts. However I need use both modules for one particular host and 
> then my nightmare starts, because always Puppet complaint, saying: Error 
> 400 on SERVER: Duplicate declaration.
>
> I know is duplicated, but it's different modules and I have to guarantee 
> both modules declare that resours.
>
> Is there any way to skip this problem?
>
>
> The easiest way to resolve the problem is to move the folder resource into 
> a separate class and make it a virtual resource. Then inside your two 
> existing modules, include the virtual resource class, and then realize the 
> virtual resource. Like all other resource declarations, you can only 
> declare a virtual resource once, but you can realize it any number of times.
>
> This puppet doc should give you all the information you need:
> https://docs.puppetlabs.com/puppet/latest/reference/lang_virtual.html
>
> --
> Peter Bukowinski
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/85949279-09a2-47f7-b40e-ed040a12f8a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to