I am implementing a defined resource in puppet to create a number of websites.
One of the steps is creating the documentroot directory for the website.
My problem is that some websites can share a common documentroot. When that happens I get the error:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Cannot alias File[documentroot-redirpt] to ["/var/www/vhosts/parkingyredir"] at /etc/puppetlabs/code/environments/production/modules/xxx_corp_webserver/manifests/website.pp:164; resource ["File", "/var/www/vhosts/parkingyredir"] already declared at /etc/puppetlabs/code/environments/production/modules/xxx_corp_webserver/manifests/website.pp:164 at /etc/puppetlabs/code/environments/production/modules/xxx_corp_webserver/manifests/website.pp:164:3 at /etc/puppetlabs/code/environments/production/modules/xxx_corp_webserver/manifests/init.pp:10 on node llim605 So, how can I create create a resource such as that it will create the directory but not complain if I try to create it serveral times?
The owner and permissions for the documentroot directory are constant.