aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp11
1 files changed, 9 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 20561d8..30fb521 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -15,13 +15,20 @@ class ikiwiki {
mode => 755,
}
- define instance($ensure = 'present') {
+ define instance($base_url = false, $ensure = 'present') {
+
+ $ikiwiki_base = $base_url ? {
+ false => $domain,
+ default => $base_url,
+ }
+
file { "/etc/ikiwiki/$name.setup":
ensure => $ensure,
content => template('ikiwiki/ikiwiki.setup.erb'),
owner => root,
group => root,
mode => 644,
+ notify => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"],
}
case $ensure {
@@ -32,7 +39,7 @@ class ikiwiki {
}
exec { "/usr/local/sbin/ikiwiki-deploy $name":
- unless => "/bin/sh -c [ -f '${apache_sites_folder}/${name}/ikiwiki_src/index.mdw' ]",
+ unless => "/bin/sh -c '[ -f ${apache_sites_folder}/${name}/ikiwiki_src/index.mdw ]'",
user => root,
}