From a42895a88de45fdef83528e8699f8ba5920fd9af Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 31 Jan 2010 22:28:30 -0200 Subject: Using base_url at setup template --- manifests/init.pp | 7 +------ templates/ikiwiki.setup.erb | 4 ++-- 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", -- cgit v1.2.3