Re: [Puppet Users] Need help with defining same package resource in two modules

Martin Alfke
Tue, 17 Sep 2013 06:59:02 -0000

On Sep 17, 2013, at 8:18 AM, Rahul Khengare <rahulk1306@gmail.com> wrote:

> Hi Mani,
>
> Case2: A=true, when B runs it fails
> Error 400 on SERVER:
> Duplicate definition: Package[pkg1] is already defined in
> file A at line ; cannot redefine at
>
> How do i overcome this issue to complete the workflow of module B in both
cases (where A is enabled or disabled)
>
> If module A get enable then re-declaration of package[pkg1] resource is
happening. Here you can disable the module B.
>

Make your package resource virtual and realise the resource in both modules.