aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-01-31 22:28:30 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-01-31 22:28:30 -0200
commita42895a88de45fdef83528e8699f8ba5920fd9af (patch)
tree7c12bf367433b7e7cfad94ac3eaea66f3b83a245
parentef47e8abeff85758eb19cd3f22221ddb6d40cb62 (diff)
downloadpuppet-ikiwiki-a42895a88de45fdef83528e8699f8ba5920fd9af.tar.gz
puppet-ikiwiki-a42895a88de45fdef83528e8699f8ba5920fd9af.tar.bz2
Using base_url at setup template
-rw-r--r--manifests/init.pp7
-rw-r--r--templates/ikiwiki.setup.erb4
2 files changed, 3 insertions, 8 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index af7795c..4331258 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -23,7 +23,7 @@ class ikiwiki {
mode => 755,
}
- define instance($base_url = false, $ensure = 'present', $description = false,
+ define instance($base_url = $domain, $ensure = 'present', $description = false,
$adminuser = 'yourname', $adminemail = 'me@example.org', $instance = 'ikiwiki',
$account_creation_password = false, $add_plugins = false, $disable_plugins = false) {
@@ -32,11 +32,6 @@ class ikiwiki {
default => $description,
}
- $ikiwiki_base = $base_url ? {
- false => $domain,
- default => $base_url,
- }
-
case $ensure {
'present': {
file { "/etc/ikiwiki/$name.setup":
diff --git a/templates/ikiwiki.setup.erb b/templates/ikiwiki.setup.erb
index ed99ba4..fa2718f 100644
--- a/templates/ikiwiki.setup.erb
+++ b/templates/ikiwiki.setup.erb
@@ -28,8 +28,8 @@ use IkiWiki::Setup::Standard {
# Git stuff.
rcs => "git",
- historyurl => "http://git.<%= domain %>/?p=<%= name %>.git;a=history;f=[[file]]",
- diffurl => "http://git.<%= domain %>/?p=<%= name %>.git;a=blobdiff;h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_parent]];f=[[file]]",
+ historyurl => "http://git.<%= base_url %>/?p=<%= name %>.git;a=history;f=[[file]]",
+ diffurl => "http://git.<%= base_url %>/?p=<%= name %>.git;a=blobdiff;h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_parent]];f=[[file]]",
#gitorigin_branch => "origin",
#gitmaster_branch => "master",