It sounds like your atqapache::vhost type is attempting to create 
the /var/www/dev/user1/client1 directory for every vhost that is defined.  
Can you post your definition for this type here?


On Friday, September 7, 2018 at 5:05:44 PM UTC-4, Ugo Bellavance wrote:
>
> Hi,
>
> I have made a module, a long time ago, that allows me to create 
> directories and httpd config files.
>
> My pattern is /var/www/dev/$devuser/$clientname/$appname/
>
> It worked perfectly until I ended up having more than one $appname for the 
> same $clientname. Here's the error message I get:
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Duplicate declaration: File[/var/www/dev/user1/client1] is already declared 
> in file /etc/puppet/modules/atqapache/manifests/vhost.pp:146; cannot 
> redeclare at /etc/puppet/modules/myapache/manifests/vhost.pp:146 on node 
> server1.example.com
>
> The directive responsible for the creation of the folder is this one:
>
>     file { [ "$client_base", ]:
>       ensure  => 'directory',
>       owner   => "$owner",
>       group   => "$group",
>       mode    => 0744,
>     }
>
> This line defines the variable: 
>
>     $vhost_base = 
> "${atqapache::params::home}/$envstage/$client-${application}"
>
> Here's my declaration:
>
>   atqapache::vhost { 'client1-user1app1dev1' :
>     client         => 'client1',
>     envstage       => 'dev',
>     application    => 'app1',
>     devuser        => 'user1',
>   }
>
>   atqapache::vhost { 'client1-user1app2dev11' :
>     client         => 'clien1',
>     envstage       => 'dev',
>     application    => 'app2',
>     devuser        => 'user1',
>   }
>
> Does anyone know how I could modify my code so that I can have more than 
> one app per client?
>
> Thanks,
>
>
>

-- 
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/a3b15e66-e8d4-4ed6-8d6f-10cc32834b80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to