|
30 | 30 | $service_ensure = 'running', |
31 | 31 | $purge_configs = true, |
32 | 32 | $purge_vhost_dir = undef, |
| 33 | + $purge_vdir = false, |
33 | 34 | $serveradmin = 'root@localhost', |
34 | 35 | $sendfile = 'On', |
35 | 36 | $error_documents = false, |
|
121 | 122 | service_ensure => $service_ensure, |
122 | 123 | } |
123 | 124 |
|
| 125 | + # Deprecated backwards-compatibility |
| 126 | + if $purge_vdir { |
| 127 | + warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs') |
| 128 | + $purge_confd = $purge_vdir |
| 129 | + } else { |
| 130 | + $purge_confd = $purge_configs |
| 131 | + } |
| 132 | + |
124 | 133 | # Set purge vhostd appropriately |
125 | 134 | if $purge_vhost_dir == undef { |
126 | | - $_purge_vhost_dir = $purge_configs |
| 135 | + $purge_vhostd = $purge_confd |
127 | 136 | } else { |
128 | | - $_purge_vhost_dir = $purge_vhost_dir |
| 137 | + $purge_vhostd = $purge_vhost_dir |
129 | 138 | } |
130 | 139 |
|
131 | 140 | Exec { |
|
139 | 148 | file { $confd_dir: |
140 | 149 | ensure => directory, |
141 | 150 | recurse => true, |
142 | | - purge => $purge_configs, |
| 151 | + purge => $purge_confd, |
143 | 152 | notify => Class['Apache::Service'], |
144 | 153 | require => Package['httpd'], |
145 | 154 | } |
|
185 | 194 | file { $vhost_dir: |
186 | 195 | ensure => directory, |
187 | 196 | recurse => true, |
188 | | - purge => $_purge_vhost_dir, |
| 197 | + purge => $purge_vhostd, |
189 | 198 | notify => Class['Apache::Service'], |
190 | 199 | require => Package['httpd'], |
191 | 200 | } |
|
200 | 209 | file { $vhost_enable_dir: |
201 | 210 | ensure => directory, |
202 | 211 | recurse => true, |
203 | | - purge => $_purge_vhost_dir, |
| 212 | + purge => $purge_vhostd, |
204 | 213 | notify => Class['Apache::Service'], |
205 | 214 | require => Package['httpd'], |
206 | 215 | } |
|
0 commit comments