summaryrefslogtreecommitdiff
path: root/manifests/vhost
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-08-13 13:57:02 +0200
committermh <mh@immerda.ch>2013-08-13 13:57:02 +0200
commit8ec33f650271c95c7a02983b7950ad7276fae189 (patch)
tree6785359fedf85aa2fc36002af0e33e6e88a26e4c /manifests/vhost
parent94154f5877a041058e2b083cff1047604d14f202 (diff)
be more efficient when cleaning up the webdirectory
Diffstat (limited to 'manifests/vhost')
-rw-r--r--manifests/vhost/webdir.pp5
1 files changed, 5 insertions, 0 deletions
diff --git a/manifests/vhost/webdir.pp b/manifests/vhost/webdir.pp
index c9729f0..507ab25 100644
--- a/manifests/vhost/webdir.pp
+++ b/manifests/vhost/webdir.pp
@@ -68,6 +68,11 @@ define apache::vhost::webdir(
}
case $ensure {
absent: {
+ exec{"cleanup_webdir_${real_path}":
+ command => "rm -rf ${real_path}",
+ onlyif => "test -d ${real_path}",
+ before => File[$real_path],
+ }
file{$real_path:
ensure => absent,
purge => true,