aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-09-01 20:30:31 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-09-01 20:30:31 -0300
commitf725224636cbf33986dee14fdf55d0a8869f5f25 (patch)
tree37949ca5a6c0c48ebde4abffd0d7a9cdf36123f8
parent3fdbe1b0ba2d910aa3b5ca98a8fcb6117fe34276 (diff)
downloadpuppet-git-f725224636cbf33986dee14fdf55d0a8869f5f25.tar.gz
puppet-git-f725224636cbf33986dee14fdf55d0a8869f5f25.tar.bz2
Adding git-annex integration
-rw-r--r--files/gitolite.rc.wheezy1
-rw-r--r--manifests/gitolite.pp26
2 files changed, 27 insertions, 0 deletions
diff --git a/files/gitolite.rc.wheezy b/files/gitolite.rc.wheezy
index a6b5da3..a1dd058 100644
--- a/files/gitolite.rc.wheezy
+++ b/files/gitolite.rc.wheezy
@@ -56,6 +56,7 @@ $SVNSERVE = "";
# $UPDATE_CHAINS_TO = "hooks/update.secondary";
# $ADMIN_POST_UPDATE_CHAINS_TO = "hooks/post-update.secondary";
# $GL_ADC_PATH = "";
+$GL_ADC_PATH = "/var/git/adc/";
# $GL_GET_MEMBERSHIPS_PGM = "/usr/local/bin/expand-ldap-user-to-groups"
# $GL_HTTP_ANON_USER = "mob";
# $GL_REF_OR_FILENAME_PATT=qr(^[0-9a-zA-Z][0-9a-zA-Z._\@/+ :,-]*$);
diff --git a/manifests/gitolite.pp b/manifests/gitolite.pp
index 68d655e..a56735e 100644
--- a/manifests/gitolite.pp
+++ b/manifests/gitolite.pp
@@ -104,5 +104,31 @@ class gitolite inherits git {
ensure => present,
require => File['/usr/local/sbin/git-mass-update-server-info'],
}
+
+ # git-annex integration
+ package { 'git-annex':
+ ensure => present,
+ }
+
+ # wheezy onwards
+ # http://git-annex.branchable.com/tips/using_gitolite_with_git-annex/
+ file { [ '/var/git/adc', '/var/git/adc/ua' ]:
+ ensure => $::lsbdistcodename ? {
+ 'squeeze' => absent,
+ default => present,
+ },
+ owner => gitolite,
+ group => gitolite,
+ mode => 0755,
+ require => File['/var/git'],
+ }
+
+ exec { 'git-annex-shell-copier':
+ command => 'cp /usr/share/doc/gitolite/examples/adc/git-annex-shell /var/git/adc/ua/git-annex-shell',
+ user => root,
+ creates => '/var/git/adc/ua/git-annex-shell',
+ onlyif => "test -f /usr/share/doc/gitolite/examples/adc/git-annex-shell",
+ require => [ Package['git-annex'], File['/var/git/adc/ua'] ],
+ }
}