From 94094310b4575592b9af8d81c2b8577e88b86c83 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 1 Mar 2011 15:24:28 -0300 Subject: Adding protocol parameter --- manifests/init.pp | 3 ++- templates/ikiwiki.setup.erb | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index e6eeee2..80f2187 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -25,7 +25,8 @@ class ikiwiki { 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) { + $account_creation_password = false, $add_plugins = false, $disable_plugins = false, + $protocol = 'https') { $desc = $description ? { false => $title, diff --git a/templates/ikiwiki.setup.erb b/templates/ikiwiki.setup.erb index 3e7943c..56d5ad2 100644 --- a/templates/ikiwiki.setup.erb +++ b/templates/ikiwiki.setup.erb @@ -14,8 +14,8 @@ use IkiWiki::Setup::Standard { srcdir => "<%= apache_sites_folder %>/<%= name %>/ikiwiki_src", destdir => "<%= apache_sites_folder %>/<%= name %>/ikiwiki", - url => "http://<%= name %>.<%= base_url %>", - cgiurl => "http://<%= name %>.<%= base_url %>/ikiwiki.cgi", + url => "<%= protocol %>://<%= name %>.<%= base_url %>", + cgiurl => "<%= protocol %>://<%= name %>.<%= base_url %>/ikiwiki.cgi", #templatedir => "/usr/share/ikiwiki/templates", #underlaydir => "/usr/share/ikiwiki/basewiki", @@ -28,8 +28,8 @@ use IkiWiki::Setup::Standard { # Git stuff. rcs => "git", - 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]]", + historyurl => "<%= protocol %>://git.<%= base_url %>/?p=<%= name %>.git;a=history;f=[[file]]", + diffurl => "<%= protocol %>://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