]> gitweb.fluxo.info Git - puppet-ikiwiki.git/commitdiff
Using base_url at setup template
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 1 Feb 2010 00:28:30 +0000 (22:28 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 1 Feb 2010 00:28:30 +0000 (22:28 -0200)
manifests/init.pp
templates/ikiwiki.setup.erb

index af7795ca50ea7e6109b207e6ff1771bc6f3d85d0..4331258c2a62a6a5defff180c93d79fd4c5c9160 100644 (file)
@@ -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":
index ed99ba408369fd676e1a1975a8978da092b07553..fa2718f4824fb13108340194b6068c95f6444a05 100644 (file)
@@ -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",