> I don't need puppet to create the /var/www/html/site1 directory as
> that is created manually. Want puppet to check If the /var/www/html/
> site1 directory exists and create the /apps/apache/conf.d/site1.conf
> file if it does. Also need puppet to delete the /apps/apache/conf.d/
> site1.conf file if the /var/www/html/site1 directory no longer exists.
You might consider making a puppet definition that would both create the
site1 directory, and then copy the site1.conf afterwards. If you want
something already written, then David Schmitt's Apache module at
http://git.black.co.at/?p=module-apache;a=tree;h=refs/heads/production;hb=refs/heads/production
should handle all of what you're asking for. Either use it as-is, or
look through his manifests for how his definitions to enable and disable
a site programmatically. Some of his methods are Debian-specific, so
they might not translate entirely into your environment.
--
Mike Renfro / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- ren...@tntech.edu
site.pp also includes an apache::site definition that can create or
remove a configuration file depending on if you call the definition with
ensure => 'present' (the default), or ensure => 'absent'. That
definition could be easily extended to also automatically create or
remove the folder you're worried about.
> I need to check if the directory exists as a condition. I don't want
> to create the directory if it doesn't, as it is created manually
> right now and needs to stay that way for awhile.
Then you'll probably have to copy down the configuration file into a
separate location, and use an exec to cp it into the proper destination
with an onlyif test.