From 561037ae96a5539a185ef20074c6d36e8eec304e Mon Sep 17 00:00:00 2001 From: amontero Date: Thu, 26 Sep 2013 01:32:17 +0200 Subject: [PATCH] Remove vhost symlink if ensure != present. --- manifests/vhost.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/vhost.pp b/manifests/vhost.pp index 1f6fb1f241..7d23304d64 100644 --- a/manifests/vhost.pp +++ b/manifests/vhost.pp @@ -398,8 +398,12 @@ } if $::osfamily == 'Debian' { $vhost_enable_dir = $apache::vhost_enable_dir + $vhost_symlink_ensure = $ensure ? { + present => link, + default => $ensure, + } file{ "${priority_real}-${filename}.conf symlink": - ensure => link, + ensure => $vhost_symlink_ensure, path => "${vhost_enable_dir}/${priority_real}-${filename}.conf", target => "${apache::vhost_dir}/${priority_real}-${filename}.conf", owner => 'root',