Skip to content

(CAT-1308) Making mod list more restrictive and minor improvements in documentation for default mods override #2459

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Default value: `true`

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

Data type: `Variant[Array, Boolean]`
Data type: `Variant[Array[String[1]], Boolean]`

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

Default value: `true`

Expand Down
6 changes: 3 additions & 3 deletions manifests/default_mods.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#
# @api private
class apache::default_mods (
Boolean $all = true,
Optional[Variant[Array[String], String]] $mods = undef,
Boolean $use_systemd = $apache::use_systemd,
Boolean $all = true,
Optional[Variant[Array[String[1]], String[1]]] $mods = undef,
Boolean $use_systemd = $apache::use_systemd,
) {
# These are modules required to run the default configuration.
# They are not configurable at this time, so we just include
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@
class apache (
String $apache_name = $apache::params::apache_name,
String $service_name = $apache::params::service_name,
Variant[Array, Boolean] $default_mods = true,
Variant[Array[String[1]], Boolean] $default_mods = true,
Boolean $default_vhost = true,
Optional[String] $default_charset = undef,
Boolean $default_confd_files = true,
Expand Down