aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/subversion/manifests/init.pp35
-rw-r--r--modules/subversion/manifests/mirror_repository.pp15
-rw-r--r--modules/subversion/manifests/snapshot.pp21
3 files changed, 36 insertions, 35 deletions
diff --git a/modules/subversion/manifests/init.pp b/modules/subversion/manifests/init.pp
index 9ddfeb80..9d8c7992 100644
--- a/modules/subversion/manifests/init.pp
+++ b/modules/subversion/manifests/init.pp
@@ -239,39 +239,4 @@ class subversion {
}
- define snapshot($source, $refresh = '*/5', $user = 'root') {
-
- include subversion::client
-
- exec { "/usr/bin/svn co $source $name":
- creates => $name,
- user => $user,
- require => Package['subversion']
- }
-
- if ($refresh != '0') {
- cron { "update $name":
- command => "cd $name && /usr/bin/svn update -q",
- user => $user,
- minute => $refresh,
- require => Exec["/usr/bin/svn co $source $name"],
- }
- }
- }
-
- define 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"],
- }
- }
}
diff --git a/modules/subversion/manifests/mirror_repository.pp b/modules/subversion/manifests/mirror_repository.pp
new file mode 100644
index 00000000..cf41ea63
--- /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"],
+ }
+}
diff --git a/modules/subversion/manifests/snapshot.pp b/modules/subversion/manifests/snapshot.pp
new file mode 100644
index 00000000..179f1ef1
--- /dev/null
+++ b/modules/subversion/manifests/snapshot.pp
@@ -0,0 +1,21 @@
+define subversion::snapshot($source,
+ $refresh = '*/5',
+ $user = 'root') {
+
+ include subversion::client
+
+ exec { "/usr/bin/svn co $source $name":
+ creates => $name,
+ user => $user,
+ require => Package['subversion'],
+ }
+
+ if ($refresh != '0') {
+ cron { "update $name":
+ command => "cd $name && /usr/bin/svn update -q",
+ user => $user,
+ minute => $refresh,
+ require => Exec["/usr/bin/svn co $source $name"],
+ }
+ }
+}