Hi,
You could use something like this:
exec { "svn up":
command => "svn up",
notify => Service["apache"],
}
service { "apache":
enable => true,
ensure => running,
}
Regards,
Tom
On 11 Aug 2011, at 10:51, Himanshu Raina 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 [email protected].
> 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.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
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.