Skip to content

Commit

Permalink
(MODULES-5990) Addition of 'IncludeOptional conf-enabled/*.conf' to '…
Browse files Browse the repository at this point in the history
…apache2.conf' on Debian Family OS of 9/18.04 onwards
  • Loading branch information
david22swan committed Nov 30, 2018
1 parent dda155c commit 764931b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
$server_root = '/etc/httpd'
$conf_dir = "${httpd_dir}/conf"
$confd_dir = "${httpd_dir}/conf.d"
$conf_enabled = undef
$mod_dir = $::apache::version::distrelease ? {
'7' => "${httpd_dir}/conf.modules.d",
default => "${httpd_dir}/conf.d",
Expand Down Expand Up @@ -217,6 +218,11 @@
$server_root = '/etc/apache2'
$conf_dir = $httpd_dir
$confd_dir = "${httpd_dir}/conf.d"
if ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
$conf_enabled = "${httpd_dir}/conf-enabled"
} else {
$conf_enabled = undef
}
$mod_dir = "${httpd_dir}/mods-available"
$mod_enable_dir = "${httpd_dir}/mods-enabled"
$vhost_dir = "${httpd_dir}/sites-available"
Expand Down Expand Up @@ -462,6 +468,7 @@
$server_root = '/usr/local'
$conf_dir = $httpd_dir
$confd_dir = "${httpd_dir}/Includes"
$conf_enabled = undef
$mod_dir = "${httpd_dir}/Modules"
$mod_enable_dir = undef
$vhost_dir = "${httpd_dir}/Vhosts"
Expand Down Expand Up @@ -602,6 +609,7 @@
$server_root = '/etc/apache2'
$conf_dir = $httpd_dir
$confd_dir = "${httpd_dir}/conf.d"
$conf_enabled = undef
$mod_dir = "${httpd_dir}/mods-available"
$mod_enable_dir = "${httpd_dir}/mods-enabled"
$vhost_dir = "${httpd_dir}/sites-available"
Expand Down
3 changes: 3 additions & 0 deletions templates/httpd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ IncludeOptional "<%= @confd_dir %>/*.conf"
<%- else -%>
Include "<%= @confd_dir %>/*.conf"
<%- end -%>
<%- if @conf_enabled and scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
IncludeOptional "<%= @conf_dir %>/*.conf"
<%- end -%>
<% if @vhost_load_dir != @confd_dir -%>
<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%>
IncludeOptional "<%= @vhost_load_dir %>/<%= @vhost_include_pattern %>"
Expand Down

0 comments on commit 764931b

Please sign in to comment.