-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(MODULES-5990) Addition of 'IncludeOptional conf-enabled/*.conf' to apache2.conf' on Debian Family OS #1851
Conversation
templates/httpd.conf.erb
Outdated
@@ -109,6 +109,9 @@ LogFormat "<%= format -%>" <%= nickname %> | |||
<%- end -%> | |||
<% end -%> | |||
|
|||
<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> | |||
IncludeOptional "<%= @conf_dir %>conf-enabled/*.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing at least a slash. This will result in /etc/apache2conf-enabled/*.conf
.
It's also rather ugly to do this on all distros, even those that don't have this mechanism. I wonder if we need a $conf_enable_dir
that's undef
on all other distros so you can test for it in the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekohl Have updated the code to be along the lines of what you suggested
8a00e20
to
726417f
Compare
764931b
to
a31a2dc
Compare
…apache2.conf' on Debian Family OS of 9/18.04 onwards
a31a2dc
to
54996ad
Compare
puppetlabs/puppetlabs-apache#1851 in upstream puppet apache module expects this directory to be present. We still want to make sure there are no unmanaged files there.
I think this is missing something. If the folder gets included by default, it should be managed by default as well. Especially since the default for config dirs is to purge them. @david22swan What do you think about it? I'm happy to fix it myself in a PR, just want your opinion if this seems reasonable. |
@david22swan Thats, of course, an option as well ;) I thought about doing this: class apache (
...
Optional[Stdlib::Absolutepath] $conf_enabled = $apache::params::conf_enabled,
...
) {
...
if $conf_enabled {
file { $conf_enabled:
ensure => directory,
recurse => true,
purge => $purge_confd,
force => $purge_confd,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
...
} While writing this I realized the /etc/apache/conf-enabled is the correct directory for Debian based systems instead of conf.d, right? Should we just change the |
@baurmatt Sorry for the wait, I looked into what you said and the code addition looks good. However the second part, about changing the directory from conf.d, I am not so sure. Honestly my overall apache knowledge isn't the greatest and after looking into it I can't see a strong reason for it. |
@david22swan No worries! :) As far as I remember, the conf.d directory isn't available by default on Debian based systems.It's a RedHat-ish thing. On Debian based systems the folder is called conf-enabled. Therefore I think it makes sense to replace the conf.d directory with conf-enabled. |
@baurmatt I'm still unsure, if you want to go ahead and start work on that I won't stop you, but it's not something that would get merged in quickly and would require some serious discussion throughout my team and not just me. |
(MODULES-5990) Addition of 'IncludeOptional conf-enabled/*.conf' to '…
…apache2.conf' on Debian Family OS