aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion/manifests/mirror_repository.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/subversion/manifests/mirror_repository.pp')
-rw-r--r--modules/subversion/manifests/mirror_repository.pp15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/subversion/manifests/mirror_repository.pp b/modules/subversion/manifests/mirror_repository.pp
new file mode 100644
index 00000000..1e0fabd3
--- /dev/null
+++ b/modules/subversion/manifests/mirror_repository.pp
@@ -0,0 +1,15 @@
+define subversion::mirror_repository( $source,
+ $refresh = '*/5') {
+ include subversion::mirror
+
+ exec { "/usr/local/bin/create_svn_mirror.sh ${name} ${source}":
+ creates => $name,
+ require => Package['subversion-tools']
+ }
+
+ cron { "update ${name}":
+ command => "/usr/bin/svnsync synchronize -q file://${name}",
+ minute => $refresh,
+ require => Exec["/usr/local/bin/create_svn_mirror.sh ${name} ${source}"],
+ }
+}