summaryrefslogtreecommitdiff
path: root/manifests/vhost/webdir.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-08-21 00:33:25 +0200
committermh <mh@immerda.ch>2009-08-21 00:33:25 +0200
commit134d787d2ec8dbc505f25d06c0fa4eb74e6864a6 (patch)
tree1c9b741c00180df10c30ba89beba3885e625db54 /manifests/vhost/webdir.pp
parent3ad6cadc5bad76c9b89cc83a9681d08bc59c9296 (diff)
don't purge docroot if it isn't managed
Diffstat (limited to 'manifests/vhost/webdir.pp')
-rw-r--r--manifests/vhost/webdir.pp6
1 files changed, 5 insertions, 1 deletions
diff --git a/manifests/vhost/webdir.pp b/manifests/vhost/webdir.pp
index a6c6b2f..a80f0f8 100644
--- a/manifests/vhost/webdir.pp
+++ b/manifests/vhost/webdir.pp
@@ -80,7 +80,11 @@ define apache::vhost::webdir(
}
case $ensure {
absent: {
- file{[ "$real_path", "${real_path}/private", "$documentroot", "$logdir" ]:
+ $managed_directories = [ "$real_path", "${real_path}/private", "$logdir" ]
+ if $manage_docroot {
+ $managed_directories += [ "$documentroot" ]
+ }
+ file{$managed_directories:
ensure => absent,
purge => true,
recurse => true,