aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp26
1 files changed, 19 insertions, 7 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 1cef3e6..35b7b8d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -32,15 +32,27 @@ class ikiwiki {
}
exec { "/usr/local/sbin/ikiwiki-deploy $name":
- unless => "/bin/sh -c [ -f '${apache_sites_folder}/${name}_src/index.mdw' ]",
+ unless => "/bin/sh -c [ -f '${apache_sites_folder}/${name}_src/index.mdw' ]",
}
- file { [ "${apache_sites_folder}/${name}_src" ]:
- ensure => directory,
- owner => gitosis,
- group => gitosis,
- recurse => true,
- notify => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"],
+ if !defined(File["${apache_sites_folder}/${name}_src"]) {
+ file { "${apache_sites_folder}/${name}_src":
+ ensure => directory,
+ owner => gitosis,
+ group => gitosis,
+ recurse => true,
+ notify => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"],
+ }
+ }
+
+ if !defined(File["${apache_sites_folder}/${name}"]) {
+ file { "${apache_sites_folder}/${name}":
+ ensure => directory,
+ owner => gitosis,
+ group => gitosis,
+ recurse => true,
+ notify => Exec["ikiwiki --setup /etc/ikiwiki/$name.setup"],
+ }
}
}
}