From cf9d120a37a562f1206e6e08f4adf4b5d27fca6d Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Fri, 26 Sep 2014 16:20:18 -0400 Subject: [PATCH] Revert "Remove deprecated purge_vdir; Rename variables" --- manifests/init.pp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 7fcd533e5..ed0fb099b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -30,6 +30,7 @@ $service_ensure = 'running', $purge_configs = true, $purge_vhost_dir = undef, + $purge_vdir = false, $serveradmin = 'root@localhost', $sendfile = 'On', $error_documents = false, @@ -121,11 +122,19 @@ service_ensure => $service_ensure, } + # Deprecated backwards-compatibility + if $purge_vdir { + warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs') + $purge_confd = $purge_vdir + } else { + $purge_confd = $purge_configs + } + # Set purge vhostd appropriately if $purge_vhost_dir == undef { - $_purge_vhost_dir = $purge_configs + $purge_vhostd = $purge_confd } else { - $_purge_vhost_dir = $purge_vhost_dir + $purge_vhostd = $purge_vhost_dir } Exec { @@ -139,7 +148,7 @@ file { $confd_dir: ensure => directory, recurse => true, - purge => $purge_configs, + purge => $purge_confd, notify => Class['Apache::Service'], require => Package['httpd'], } @@ -185,7 +194,7 @@ file { $vhost_dir: ensure => directory, recurse => true, - purge => $_purge_vhost_dir, + purge => $purge_vhostd, notify => Class['Apache::Service'], require => Package['httpd'], } @@ -200,7 +209,7 @@ file { $vhost_enable_dir: ensure => directory, recurse => true, - purge => $_purge_vhost_dir, + purge => $purge_vhostd, notify => Class['Apache::Service'], require => Package['httpd'], }