Hello,

I am hoping that someone might be able to shed some light on the best way
to solve an issue.

https://github.com/puppetlabs/puppetlabs-apache/commit/c2c75a62b7dafced8a6120a14bacfc8be7539282<https://github.com/puppetlabs/puppetlabs-apache/commit/c2c75a62b7dafced8a6120a14bacfc8be7539282#commitcomment-1654941>

This commit introduced functionality into the vhost type to ensure that the
$docroot and $logroot exist. This is smart as Apache will throw a warning
if $docroot does not exist and error out if $logroot does not exist.

I believe the original intention of the author was to make the names of
these resources unique so that multiple vhosts can share the same docroot
and logroot (line 71-80). However, the path of the resources is not unique
across vhosts that use the same $docroot and $logroot and therefore puppet
will error out.

The first thing that came to my mind was to make the resources virtual and
then just realize a single directory. Unless something special needs done,
marking the two file resources as virtual (@file) still does not work.

The other option that has been discussed is to use a conditional if block:

https://github.com/puppetlabs/puppetlabs-apache/pull/37/files

Here, on all but one of the vhost entries, you mark ensure_dirs as false
and Puppet will not enforce the existence of the two directories. This
works, but it comes off as a workaround more than a proper solution.

Any ideas?

Thanks,
Joe



-- 
Joe Topjian
Systems Administrator
Cybera Inc.

www.cybera.ca

Cybera is a not-for-profit organization that works to spur and support
innovation, for the economic benefit of Alberta, through the use
of cyberinfrastructure.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to