]> gitweb.fluxo.info Git - puppet-ikiwiki.git/commitdiff
Adding git_folder parameter
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 11 Apr 2013 23:44:59 +0000 (20:44 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 11 Apr 2013 23:44:59 +0000 (20:44 -0300)
manifests/init.pp
manifests/instance.pp
templates/deploy.sh.erb
templates/refresh.sh.erb

index b2c25b2d224bbf278fc4b8619b6ad0f0c0947418..74edacd6445ff5c4edcc1aab0513e4a6764484bc 100644 (file)
@@ -1,7 +1,8 @@
 class ikiwiki(
   $sites_folder       = '/var/sites',
   $git_implementation = 'gitolite',
-  $www_user           = 'www-data'
+  $www_user           = 'www-data',
+  $git_folder         = '/var/git/repositories'
 ) {
   package { [ "ikiwiki", "po4a" ]:
     ensure => installed,
index c7648dac4d378bd390f0f25069983991ba725771..a8ed0d905850dd0b154aac0674bcafded81b1f51 100644 (file)
@@ -95,7 +95,7 @@ define ikiwiki::instance(
       }
 
       # See http://rtime.felk.cvut.cz/~sojka/blog/using-ikiwiki-with-gitolite/
-      file { "/var/git/repositories/${name}.git/hooks/post-update":
+      file { "${ikiwiki::git_folder}/${name}.git/hooks/post-update":
         ensure  => present,
         owner   => $owner,
         group   => $ikiwiki::git_implementation,
index e895546396e587f24df2e842b8ac8153ade374fa..2673d3a23a1a79a86f27877798d604226923e3bf 100644 (file)
@@ -12,8 +12,8 @@ INSTANCE="ikiwiki"
 CONF="/etc/ikiwiki"
 BASE="<%= scope.lookupvar('ikiwiki::sites_folder') %>"
 REPO_OWNER="<%= scope.lookupvar('ikiwiki::git_implementation') %>"
+REPO="<%= scope.lookupvar('ikiwiki::git_folder') %>/$NAME.git"
 REMOTE="$REPO_OWNER@localhost:$NAME"
-REPO="/var/git/repositories/$NAME.git"
 
 # Syntax check
 if [ -z "$INSTANCE" ]; then
index 10b96c143ed919db9983a6cc730c640be7d2fa21..7e7adf6c259c5c8e8feafdc5a6c73c4f3889dac9 100644 (file)
@@ -14,7 +14,7 @@ WWW_USER="<%= scope.lookupvar('ikiwiki::www_user') %>"
 BASE="<%= scope.lookupvar('ikiwiki::sites_folder') %>"
 REPO_OWNER="<%= scope.lookupvar('ikiwiki::git_implementation') %>"
 REPO_GROUP="<%= scope.lookupvar('ikiwiki::git_implementation') %>"
-REPO="/var/git/repositories/$NAME.git"
+REPO="<%= scope.lookupvar('ikiwiki::git_folder') %>/$NAME.git"
 
 # Syntax check
 if [ -z "$INSTANCE" ]; then