I looked through his definitions and it only checks if the proper
packages exists before setting up his configuration files.  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.  Eventually it will all be
automated in puppet, but haven't gone that far yet.

I just want to do something like this (in bash):

if [ -d "/var/www/html/site1" ]; then
touch /apps/apache/conf.d/site1.conf
exit 0
else
echo "directory does not exist"
exit 1
fi

This seems like a simple thing to do, but for the life of me can't
figure out how to do this in puppet.

On Nov 21, 9:46 am, Mike Renfro <[EMAIL PROTECTED]> wrote:
> Hang Chan wrote:
> > 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 
> athttp://git.black.co.at/?p=module-apache;a=tree;h=refs/heads/productio...
> 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 -- [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to