Skip to content

Commit 606f5e4

Browse files
authored
Merge pull request #2309 from david22swan/maint/enable_vhost_enable_dir
(maint) Add variable manage_vhost_enable_dir
2 parents 648332c + 632a969 commit 606f5e4

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)