This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add tunable share dir for gitolite

  • Loading branch information...
Adrien Thebo
Adrien Thebo committed Mar 22, 2012
1 parent b60ff73 commit b5d989a5e39ae1296b8b2bee9a3b0559b26fa9ee
Showing with 9 additions and 4 deletions.
  1. +7 −2 manifests/rc.pp
  2. +2 −2 templates/_gitolite.rc.erb
View
@@ -20,17 +20,22 @@
$gl_wildrepos_perm_cats = hiera('gitolite_rc_gl_wildrepos_perm_cats'),
$projects_list = hiera('gitolite_rc_projects_list'),
$repo_umask = hiera('gitolite_rc_repo_umask'),
+ $gl_adc_path = hiera('gitolite_rc_gl_adc_path', 'UNSET'),
+ $gl_htpasswd_file = hiera('gitolite_rc_gl_htpasswd_file', 'UNSET')
) {
require gitolite::instance
- $gl_adc_path = hiera('gitolite_rc_gl_adc_path', 'UNSET')
- $gl_htpasswd_file = hiera('gitolite_rc_gl_htpasswd_file', 'UNSET')
$user = hiera('gitolite_instance_user')
$group = hiera('gitolite_instance_group')
$home = hiera('gitolite_instance_home')
+ $gl_share_dir = hiera('gitolite_install_source') ? {
+ 'git' => "${home}/share",
+ default => "/usr/share",
+ }
+
file { "${home}/.gitolite.rc":
ensure => present,
owner => $user,
@@ -19,8 +19,8 @@ $GL_CONF_COMPILED="$GL_ADMINDIR/conf/gitolite.conf-compiled.pm";
# DO NOT CHANGE THE NEXT FOUR LINES UNLESS YOU REALLY KNOW WHAT YOU'RE DOING.
# These variables are set automatically by the install method you choose.
# (PACKAGE MAINTAINERS: PLEASE READ doc/packaging.mkd)
-$GL_PACKAGE_CONF = "/usr/share/gitolite/conf";
-$GL_PACKAGE_HOOKS = "/usr/share/gitolite/hooks";
+$GL_PACKAGE_CONF = "<%= gl_share_dir %>/gitolite/conf";
+$GL_PACKAGE_HOOKS = "<%= gl_share_dir %>/gitolite/hooks";
# ------------------------------------------------------------------------------
# most often used/changed variables

0 comments on commit b5d989a

Please sign in to comment.