I currently have this loaded in my puppet config, from what svn tells
me, it is something a co-worker wrote...
define svn_get_single_file($repo, $destination, $ensure = 'present') {
$path = "${name}"
case $ensure {
default: { err ( "you must specify present or absent for
ensure!" ) }
present: {
exec {
"/usr/bin/svn export ${repo}${path} ${destination}":
unless => "/usr/bin/test -e ${destination}";
}
}
absent: {
exec {
"/bin/rm -f ${destination}":
onlyif => "/usr/bin/test -e ${destination}";
}
}
force: {
exec {
"svn_get_signle_file(forced) $path":
command => "/usr/bin/svn export ${repo}${path} $
{destination}";
}
}
}
}
It was his no-effort implementation.
You should also look at these pages:
http://reductivelabs.com/trac/puppet/wiki/CreatingCustomTypes
http://reductivelabs.com/trac/puppet/wiki/WritingYourOwnFunctions
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---