Skip to content

Commit 632a969

Browse files
committed
(maint) Add variable manage_vhost_enable_dir
Additional variable added at request of community to allow for `vhost_enable_dir` to be disabled on Debian systems. Due to the way in which aid variable inherits from the params manifest, simply setting it to `undef` does not work as when this is done it's logic assumes it should inherit from the default params value.
1 parent accb538 commit 632a969

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

manifests/init.pp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,11 @@
439439
# Whether the additional config files in `/etc/apache2/conf-enabled` should be managed.
440440
#
441441
# @param vhost_enable_dir
442-
# Set's whether the vhost definitions will be stored in sites-availible and if
442+
# Set's the vhost definitions which will be stored in sites-availible and if
443443
# they will be symlinked to and from sites-enabled.
444+
#
445+
# @param manage_vhost_enable_dir
446+
# Overides the vhost_enable_dir inherited parameters and allows it to be disabled
444447
#
445448
# @param mod_enable_dir
446449
# Set's whether the mods-enabled directory should be managed.
@@ -500,6 +503,7 @@
500503
Optional[Stdlib::Absolutepath] $conf_enabled = $apache::params::conf_enabled,
501504
Stdlib::Absolutepath $vhost_dir = $apache::params::vhost_dir,
502505
Optional[Stdlib::Absolutepath] $vhost_enable_dir = $apache::params::vhost_enable_dir,
506+
Boolean $manage_vhost_enable_dir = true,
503507
Hash $mod_libs = $apache::params::mod_libs,
504508
Hash $mod_packages = $apache::params::mod_packages,
505509
String $vhost_include_pattern = $apache::params::vhost_include_pattern,
@@ -703,7 +707,7 @@
703707
}
704708
}
705709

706-
if $vhost_enable_dir and ! defined(File[$vhost_enable_dir]) {
710+
if $vhost_enable_dir and ! defined(File[$vhost_enable_dir]) and $manage_vhost_enable_dir {
707711
$vhost_load_dir = $vhost_enable_dir
708712
exec { "mkdir ${vhost_load_dir}":
709713
creates => $vhost_load_dir,

0 commit comments

Comments
 (0)