]> gitweb.fluxo.info Git - puppet-git.git/commitdiff
Adding git-mass-update-server-info
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 20 Oct 2010 16:04:24 +0000 (14:04 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 20 Oct 2010 16:04:24 +0000 (14:04 -0200)
files/git-mass-update-server-info [new file with mode: 0644]
manifests/gitosis.pp

diff --git a/files/git-mass-update-server-info b/files/git-mass-update-server-info
new file mode 100644 (file)
index 0000000..5735f69
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# Run git-update-server-info on all repositories. 
+#
+# This is script is needed when servir repositories directly
+# to dumb servers (eg. via HTTP).
+#
+
+REPOS="/var/git/repositories"
+
+for repo in `ls $REPOS`; do
+  ( cd $REPOS/$repo && su gitosis -c "git update-server-info" )
+done
index ebe0c2a2279bf2773243b8681b403dcef3681e25..853ca7e3911a616a03c9100e57cd378592c5d4c8 100644 (file)
@@ -64,4 +64,23 @@ class gitosis inherits git {
     backup => false,
     require => User["gitosis"],
   }
+
+  # mass update script
+  file { "/usr/local/sbin/git-mass-update-server-info":
+    ensure => present,
+    owner  => root,
+    group  => root,
+    mode   => 0755,
+    source => "puppet:///files/git/git-mass-update-server-info",
+  }
+
+  # mass update hourly
+  cron { "/usr/local/sbin/git-mass-update-server-info":
+    command  => "/usr/local/sbin/git-mass-update-server-info &> /dev/null",
+    user     => root,
+    hour     => "*/1",
+    minute   => "20",
+    ensure   => present,
+    require  => File['/usr/local/sbin/git-mass-update-server-info'],
+  }
 }