[Mageia-sysadm] [83] - module to manage subversion snapshot

root at mageia.org root at mageia.org
Thu Nov 4 15:59:38 CET 2010


Revision: 83
Author:   misc
Date:     2010-11-04 15:59:38 +0100 (Thu, 04 Nov 2010)
Log Message:
-----------
- module to manage subversion snapshot 

Added Paths:
-----------
    puppet/modules/subversion/
    puppet/modules/subversion/manifests/
    puppet/modules/subversion/manifests/init.pp

Added: puppet/modules/subversion/manifests/init.pp
===================================================================
--- puppet/modules/subversion/manifests/init.pp	                        (rev 0)
+++ puppet/modules/subversion/manifests/init.pp	2010-11-04 14:59:38 UTC (rev 83)
@@ -0,0 +1,52 @@
+# should be replaced by vcsrepo
+# https://github.com/reductivelabs/puppet-vcsrepo
+# but not integrated in puppet directly for the moment
+class subversion {
+
+
+    class server {
+        package { "subversion-server":
+            ensure => installed,
+        }
+    }
+
+    # TODO create proper hook directory ( see zarb.org )
+    # create documentation
+    # - group who can commit 
+
+#    define repository ($group => "svn") {
+#        # $name ==> lieu du checkout 
+#        exec { "svnadmin create $name":
+#            path => "/usr/bin:/usr/sbin:/bin",
+#            creates => $name             
+#        }
+#        # TODO complete documentation
+#        file { "$name":
+#            mode => 660
+#            recurse => true
+#        } 
+#        # file pour les hooks
+#    }
+
+
+    class client {
+        package { subversion:
+            ensure => installed,
+        }
+    }
+
+    # TODO ensure that subversion ishere
+    #      allow to configure the snapshot refresh interval
+    define snapshot($source, $refresh, $user = 'root')  {
+        exec { "/usr/bin/svn co $source $name":
+            creates => $name,           
+            user => $user,  
+        }
+
+        cron { "update $name":
+           command => "cd $name && /usr/bin/svn update -q",
+           user => $user,
+           minute => '*/5'
+        }   
+    }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101104/facfc10d/attachment.html>


More information about the Mageia-sysadm mailing list