From e089d99d7d0fde8a84677d15c12cf4f56092a4c4 Mon Sep 17 00:00:00 2001 From: Lennart Betz Date: Sun, 4 Aug 2024 10:13:55 +0200 Subject: [PATCH 1/2] Add new param to load additonal Apache modules --- REFERENCE.md | 9 +++++++++ manifests/web.pp | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/REFERENCE.md b/REFERENCE.md index 285876b..27caad1 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -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) * [`db_type`](#-icinga--web--db_type) * [`db_host`](#-icinga--web--db_host) * [`db_port`](#-icinga--web--db_port) @@ -838,6 +839,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. +##### `apache_extra_mods` + +Data type: `Array[String]` + +List of addational Apache modules to load. + +Default value: `[]` + ##### `db_type` Data type: `Enum['mysql', 'pgsql']` diff --git a/manifests/web.pp b/manifests/web.pp index 9534706..d9708cd 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -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 db_type # What kind of database type to use. # @@ -56,6 +59,7 @@ Boolean $manage_database = false, Variant[Stdlib::Host, Array[Stdlib::Host]] $api_host = 'localhost', String $api_user = 'icingaweb2', + Array[String] $apache_extra_mods = [], ) { # install all required php extentions # by icingaweb (done by package dependencies) before PHP @@ -152,6 +156,9 @@ include apache::mod::proxy_http include apache::mod::ssl + # Load additional modules + include prefix($apache_extra_mods, 'apache::mod::') + apache::custom_config { 'icingaweb2': ensure => present, content => template('icinga/apache_custom_default.conf.erb'), From 31b59aa068772e26d754726934e4ef0fe78d86c7 Mon Sep 17 00:00:00 2001 From: Lennart Betz Date: Mon, 5 Aug 2024 15:10:52 +0200 Subject: [PATCH 2/2] Update manifests/web.pp Co-authored-by: Tim Meusel --- manifests/web.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/web.pp b/manifests/web.pp index d9708cd..a7ce473 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -59,7 +59,7 @@ Boolean $manage_database = false, Variant[Stdlib::Host, Array[Stdlib::Host]] $api_host = 'localhost', String $api_user = 'icingaweb2', - Array[String] $apache_extra_mods = [], + Array[String[1]] $apache_extra_mods = [], ) { # install all required php extentions # by icingaweb (done by package dependencies) before PHP