Skip to content

Commit 96932e8

Browse files
authored
Merge branch 'main' into main
2 parents ffdc076 + abb8410 commit 96932e8

File tree

5 files changed

+57
-11
lines changed

5 files changed

+57
-11
lines changed

REFERENCE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Default value: `true`
346346

347347
##### <a name="-apache--default_mods"></a>`default_mods`
348348

349-
Data type: `Variant[Array, Boolean]`
349+
Data type: `Variant[Array[String[1]], Boolean]`
350350

351351
Determines whether to configure and enable a set of default Apache modules depending on
352352
your operating system.<br />
@@ -356,7 +356,14 @@ on your operating system, and you can declare any other modules separately using
356356
If `true`, Puppet installs additional modules, depending on the operating system and
357357
the value of the `mpm_module` parameter. Because these lists of
358358
modules can change frequently, consult the Puppet module's code for up-to-date lists.<br />
359-
If this parameter contains an array, Puppet instead enables all passed Apache modules.
359+
If this parameter contains an array, Puppet will enable all the Apache modules passed in it.
360+
Passing the values as an array of strings provides the flexibility to override the default mods and install modules defined in `$default_mods`.
361+
For example, with array of string:<br />
362+
```puppet
363+
class { 'apache':
364+
default_mods => ['cache', 'info', 'mime_magic']
365+
}
366+
```
360367

361368
Default value: `true`
362369

manifests/default_mods.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#
44
# @api private
55
class apache::default_mods (
6-
Boolean $all = true,
7-
Optional[Variant[Array[String], String]] $mods = undef,
8-
Boolean $use_systemd = $apache::use_systemd,
6+
Boolean $all = true,
7+
Optional[Variant[Array[String[1]], String[1]]] $mods = undef,
8+
Boolean $use_systemd = $apache::use_systemd,
99
) {
1010
# These are modules required to run the default configuration.
1111
# They are not configurable at this time, so we just include

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
class apache (
460460
String $apache_name = $apache::params::apache_name,
461461
String $service_name = $apache::params::service_name,
462-
Variant[Array, Boolean] $default_mods = true,
462+
Variant[Array[String[1]], Boolean] $default_mods = true,
463463
Boolean $default_vhost = true,
464464
Optional[String] $default_charset = undef,
465465
Boolean $default_confd_files = true,

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"requirements": [
8484
{
8585
"name": "puppet",
86-
"version_requirement": ">= 7.0.0 < 9.0.0"
86+
"version_requirement": ">= 7.9.0 < 9.0.0"
8787
}
8888
],
8989
"description": "Module for Apache configuration",

templates/vhost/_directories.erb

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,50 @@
299299
AuthLDAPGroupAttribute <%= groupattr %>
300300
<%- end -%>
301301
<%- end -%>
302-
<%- if directory['auth_ldap_group_attribute_is_dn'] == 'off' -%>
303-
AuthLDAPGroupAttributeIsDN Off
302+
<%- unless directory['auth_ldap_group_attribute_is_dn'].nil? -%>
303+
AuthLDAPGroupAttributeIsDN <%= scope.call_function('apache::bool2httpd', [ directory['auth_ldap_group_attribute_is_dn'] ]) %>
304304
<%- end -%>
305-
<%- if directory['auth_ldap_group_attribute_is_dn'] == 'on' -%>
306-
AuthLDAPGroupAttributeIsDN On
305+
<%- if directory['auth_ldap_initial_bind_pattern'] -%>
306+
AuthLDAPInitialBindPattern <%= directory['auth_ldap_initial_bind_pattern'] %>
307+
<%- end -%>
308+
<%- unless directory['auth_ldap_bind_as_user'].nil? -%>
309+
AuthLDAPInitialBindAsUser <%= scope.call_function('apache::bool2httpd', [ directory['auth_ldap_bind_as_user'] ]) %>
310+
<%- end -%>
311+
<%- unless directory['auth_ldap_compare_as_user'].nil? -%>
312+
AuthLDAPCompareAsUser <%= scope.call_function('apache::bool2httpd', [ directory['auth_ldap_compare_as_user'] ]) %>
313+
<%- end -%>
314+
<%- unless directory['auth_ldap_search_as_user'].nil? -%>
315+
AuthLDAPSearchAsUser <%= scope.call_function('apache::bool2httpd', [ directory['auth_ldap_search_as_user'] ]) %>
316+
<%- end -%>
317+
<%- unless directory['auth_ldap_bind_authoritative'].nil? -%>
318+
AuthLDAPBindAuthoritative <%= scope.call_function('apache::bool2httpd', [ directory['auth_ldap_bind_authoritative'] ]) %>
319+
<%- end -%>
320+
<%- if directory['auth_ldap_authorize_prefix'] -%>
321+
AuthLDAPAuthorizePrefix <%= directory['auth_ldap_authorize_prefix'] %>
322+
<%- end -%>
323+
<%- if directory['auth_ldap_charset_config'] -%>
324+
AuthLDAPCharsetConfig <%= directory['auth_ldap_charset_config'] %>
325+
<%- end -%>
326+
<%- unless directory['auth_ldap_compare_dn_on_server'].nil? -%>
327+
AuthLDAPCompareDNOnServer <%= scope.call_function('apache::bool2httpd', [ directory['auth_ldap_compare_dn_on_server'] ]) %>
328+
<%- end -%>
329+
<%- if directory['auth_ldap_dereference_aliases'] -%>
330+
AuthLDAPDereferenceAliases <%= directory['auth_ldap_dereference_aliases'] %>
331+
<%- end -%>
332+
<%- if directory['auth_ldap_max_sub_group_depth'] -%>
333+
AuthLDAPMaxSubGroupDepth <%= directory['auth_ldap_max_sub_group_depth'] %>
334+
<%- end -%>
335+
<%- if directory['auth_ldap_remote_user_attribute'] -%>
336+
AuthLDAPRemoteUserAttribute <%= directory['auth_ldap_remote_user_attribute'] %>
337+
<%- end -%>
338+
<%- unless directory['auth_ldap_remote_user_is_dn'].nil? -%>
339+
AuthLDAPRemoteUserIsDN <%= scope.call_function('apache::bool2httpd', [ directory['auth_ldap_remote_user_is_dn'] ]) %>
340+
<%- end -%>
341+
<%- if directory['auth_ldap_sub_group_attribute'] -%>
342+
AuthLDAPSubGroupAttribute <%= directory['auth_ldap_sub_group_attribute'] %>
343+
<%- end -%>
344+
<%- if directory['auth_ldap_sub_group_class'] -%>
345+
AuthLDAPSubGroupClass <%= directory['auth_ldap_sub_group_class'] %>
307346
<%- end -%>
308347
<%- if directory['fallbackresource'] -%>
309348
FallbackResource <%= directory['fallbackresource'] %>

0 commit comments

Comments
 (0)