Skip to content
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

Add new param to load additonal Apache modules #143

Merged
merged 3 commits into from
Aug 5, 2024
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
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ The following parameters are available in the `icinga::web` class:
* [`default_admin_pass`](#-icinga--web--default_admin_pass)
* [`db_pass`](#-icinga--web--db_pass)
* [`apache_cgi_pass_auth`](#-icinga--web--apache_cgi_pass_auth)
* [`apache_extra_mods`](#-icinga--web--apache_extra_mods)
* [`apache_config`](#-icinga--web--apache_config)
* [`db_type`](#-icinga--web--db_type)
* [`db_host`](#-icinga--web--db_host)
Expand Down Expand Up @@ -839,6 +840,14 @@ Data type: `Boolean`
Either turn on or off the apache cgi pass thru auth.
An option available since Apache v2.4.15 and required for authenticated access to the Icinga Web Api.

##### <a name="-icinga--web--apache_extra_mods"></a>`apache_extra_mods`

Data type: `Array[String[1]]`

List of addational Apache modules to load.

Default value: `[]`

##### <a name="-icinga--web--apache_config"></a>`apache_config`

Data type: `Boolean`
Expand Down
7 changes: 7 additions & 0 deletions manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# Either turn on or off the apache cgi pass thru auth.
# An option available since Apache v2.4.15 and required for authenticated access to the Icinga Web Api.
#
# @param apache_extra_mods
# List of addational Apache modules to load.
#
# @param apache_config
# Wether or not install an default Apache config for Icinga Web 2. If set to `true` Icinga is
# reachable via `/icingaweb2`.
Expand Down Expand Up @@ -60,6 +63,7 @@
Boolean $manage_database = false,
Variant[Stdlib::Host, Array[Stdlib::Host]] $api_host = 'localhost',
String $api_user = 'icingaweb2',
Array[String[1]] $apache_extra_mods = [],
Boolean $apache_config = true,
) {
# install all required php extentions
Expand Down Expand Up @@ -157,6 +161,9 @@
include apache::mod::proxy_http
include apache::mod::ssl

# Load additional modules
include prefix($apache_extra_mods, 'apache::mod::')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay that's a nice hack that I haven't seen before <3


if $apache_config {
apache::custom_config { 'icingaweb2':
ensure => present,
Expand Down
Loading