Why don't you generate httpd.conf from a template in Puppet and restart
apache if deemed necessary?

On Thu, Aug 11, 2011 at 1:51 AM, Himanshu Raina <dopedoxy...@gmail.com>wrote:

> Hi,
>
>
> Can I execute a command basis on some criteria in puppet. For example, I
> would want to execute the following command
>
> svn up; /usr/local/apache/bin/apachectl restart
>
> only if "revision number of file on host = revision number of file on svn"
>
> i.e.
>
> "/usr/bin/svn info /usr/local/apache/conf/Web_Config/httpd.conf | grep
> Revision| cut -d: -f2| sed -e's/ //g'" = "/usr/bin/svn info
> http://svn.myhost.com/svn/Configuration_Management/Backup/Web_Config/httpd.conf|
>  grep Revision| cut -d: -f2| sed -e's/ //g'"
>
> Is it possible or instead can I do a md5sum of both the configurations i.e
> one available on svn and one on the host machine and if they differ execute
> the command else exit ??
>
> Regards,
>
> --
> 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.
>

-- 
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