Skip to content

Commit

Permalink
Remove deprecated purge_vdir; Rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
JCotton1123 committed Jul 3, 2014
1 parent cb1b8b8 commit 306682a
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
$service_ensure = 'running',
$purge_configs = true,
$purge_vhost_dir = undef,
$purge_vdir = false,
$serveradmin = 'root@localhost',
$sendfile = 'On',
$error_documents = false,
Expand Down Expand Up @@ -119,19 +118,11 @@
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_vhostd = $purge_confd
$_purge_vhost_dir = $purge_configs
} else {
$purge_vhostd = $purge_vhost_dir
$_purge_vhost_dir = $purge_vhost_dir
}

Exec {
Expand All @@ -145,7 +136,7 @@
file { $confd_dir:
ensure => directory,
recurse => true,
purge => $purge_confd,
purge => $purge_configs,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
Expand Down Expand Up @@ -191,7 +182,7 @@
file { $vhost_dir:
ensure => directory,
recurse => true,
purge => $purge_vhostd,
purge => $_purge_vhost_dir,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
Expand All @@ -206,7 +197,7 @@
file { $vhost_enable_dir:
ensure => directory,
recurse => true,
purge => $purge_vhostd,
purge => $_purge_vhost_dir,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
Expand Down

0 comments on commit 306682a

Please sign in to comment.