aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-11 20:44:59 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-11 20:44:59 -0300
commit2d304317118ecb8296bcc3ed489dea7af7828b03 (patch)
treeb6a156f3ddb2455d7a4fb7471064f877df85f03b
parentff2ef8f403968e16d662676f4dfbbdd991270804 (diff)
downloadpuppet-ikiwiki-2d304317118ecb8296bcc3ed489dea7af7828b03.tar.gz
puppet-ikiwiki-2d304317118ecb8296bcc3ed489dea7af7828b03.tar.bz2
Adding git_folder parameter
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/instance.pp2
-rw-r--r--templates/deploy.sh.erb2
-rw-r--r--templates/refresh.sh.erb2
4 files changed, 5 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index b2c25b2..74edacd 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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,
diff --git a/manifests/instance.pp b/manifests/instance.pp
index c7648da..a8ed0d9 100644
--- a/manifests/instance.pp
+++ b/manifests/instance.pp
@@ -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,
diff --git a/templates/deploy.sh.erb b/templates/deploy.sh.erb
index e895546..2673d3a 100644
--- a/templates/deploy.sh.erb
+++ b/templates/deploy.sh.erb
@@ -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
diff --git a/templates/refresh.sh.erb b/templates/refresh.sh.erb
index 10b96c1..7e7adf6 100644
--- a/templates/refresh.sh.erb
+++ b/templates/refresh.sh.erb
@@ -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