diff --git a/REFERENCE.md b/REFERENCE.md
index b27e10dc..b8a697c5 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -447,6 +447,8 @@ The following parameters are available in the `puppetboard::apache::conf` class:
* [`ldap_require_group`](#-puppetboard--apache--conf--ldap_require_group)
* [`ldap_require_group_dn`](#-puppetboard--apache--conf--ldap_require_group_dn)
* [`virtualenv_dir`](#-puppetboard--apache--conf--virtualenv_dir)
+* [`manage_mod_wsgi`](#-puppetboard--apache--conf--manage_mod_wsgi)
+* [`custom_mod_wsgi_parameters`](#-puppetboard--apache--conf--custom_mod_wsgi_parameters)
##### `wsgi_alias`
@@ -560,6 +562,22 @@ Set location where virtualenv will be installed
Default value: `$puppetboard::virtualenv_dir`
+##### `manage_mod_wsgi`
+
+Data type: `Boolean`
+
+A parameter to switch off the use of `apache::mod::wsgi`
+
+Default value: `true`
+
+##### `custom_mod_wsgi_parameters`
+
+Data type: `Hash`
+
+A hash passed to `apache::mod::wsgi`
+
+Default value: `{}`
+
### `puppetboard::apache::vhost`
Sets up an apache::vhost to run PuppetBoard, and writes an appropriate wsgi.py from template
@@ -590,6 +608,8 @@ The following parameters are available in the `puppetboard::apache::vhost` class
* [`ldap_require_group_dn`](#-puppetboard--apache--vhost--ldap_require_group_dn)
* [`virtualenv_dir`](#-puppetboard--apache--vhost--virtualenv_dir)
* [`custom_apache_parameters`](#-puppetboard--apache--vhost--custom_apache_parameters)
+* [`manage_mod_wsgi`](#-puppetboard--apache--vhost--manage_mod_wsgi)
+* [`custom_mod_wsgi_parameters`](#-puppetboard--apache--vhost--custom_mod_wsgi_parameters)
##### `vhost_name`
@@ -765,6 +785,22 @@ A hash passed to the `apache::vhost` for custom settings
Default value: `{}`
+##### `manage_mod_wsgi`
+
+Data type: `Boolean`
+
+A parameter to switch off the use of `apache::mod::wsgi`
+
+Default value: `true`
+
+##### `custom_mod_wsgi_parameters`
+
+Data type: `Hash`
+
+A hash passed to `apache::mod::wsgi`
+
+Default value: `{}`
+
## Data types
### `Puppetboard::Syslogpriority`
diff --git a/manifests/apache/conf.pp b/manifests/apache/conf.pp
index 81802f4e..bb4a349d 100644
--- a/manifests/apache/conf.pp
+++ b/manifests/apache/conf.pp
@@ -14,6 +14,8 @@
# @param ldap_require_group LDAP group to require on login
# @param ldap_require_group_dn LDAP group DN for LDAP group
# @param virtualenv_dir Set location where virtualenv will be installed
+# @param manage_mod_wsgi A parameter to switch off the use of `apache::mod::wsgi`
+# @param custom_mod_wsgi_parameters A hash passed to `apache::mod::wsgi`
#
# @note Make sure you have purge_configs set to false in your apache class!
# @note This runs the WSGI application with a WSGIProcessGroup of $user and a WSGIApplicationGroup of %{GLOBAL}.
@@ -33,16 +35,20 @@
Boolean $ldap_require_group = $puppetboard::ldap_require_group,
Optional[String[1]] $ldap_require_group_dn = undef,
Stdlib::Absolutepath $virtualenv_dir = $puppetboard::virtualenv_dir,
+ Boolean $manage_mod_wsgi = true,
+ Hash $custom_mod_wsgi_parameters = {},
) {
- $wsgi = $facts['os']['family'] ? {
- 'Debian' => {
- package_name => 'libapache2-mod-wsgi-py3',
- mod_path => '/usr/lib/apache2/modules/mod_wsgi.so',
- },
- default => {},
- }
- class { 'apache::mod::wsgi':
- * => $wsgi,
+ if $manage_mod_wsgi {
+ $wsgi = $facts['os']['family'] ? {
+ 'Debian' => {
+ package_name => 'libapache2-mod-wsgi-py3',
+ mod_path => '/usr/lib/apache2/modules/mod_wsgi.so',
+ },
+ default => $custom_mod_wsgi_parameters,
+ }
+ class { 'apache::mod::wsgi':
+ * => $wsgi,
+ }
}
$docroot = "${basedir}/puppetboard"
diff --git a/manifests/apache/vhost.pp b/manifests/apache/vhost.pp
index 30672b06..30d3c15b 100644
--- a/manifests/apache/vhost.pp
+++ b/manifests/apache/vhost.pp
@@ -22,6 +22,8 @@
# @param ldap_require_group_dn LDAP group DN for LDAP group
# @param virtualenv_dir Set location where virtualenv will be installed
# @param custom_apache_parameters A hash passed to the `apache::vhost` for custom settings
+# @param manage_mod_wsgi A parameter to switch off the use of `apache::mod::wsgi`
+# @param custom_mod_wsgi_parameters A hash passed to `apache::mod::wsgi`
class puppetboard::apache::vhost (
String[1] $vhost_name,
Stdlib::Unixpath $wsgi_alias = '/',
@@ -45,16 +47,20 @@
Optional[String[1]] $ldap_require_group_dn = undef,
Stdlib::Absolutepath $virtualenv_dir = $puppetboard::virtualenv_dir,
Hash $custom_apache_parameters = {},
+ Boolean $manage_mod_wsgi = true,
+ Hash $custom_mod_wsgi_parameters = {},
) {
- $wsgi = $facts['os']['family'] ? {
- 'Debian' => {
- package_name => 'libapache2-mod-wsgi-py3',
- mod_path => '/usr/lib/apache2/modules/mod_wsgi.so',
- },
- default => {},
- }
- class { 'apache::mod::wsgi':
- * => $wsgi,
+ if $manage_mod_wsgi {
+ $wsgi = $facts['os']['family'] ? {
+ 'Debian' => {
+ package_name => 'libapache2-mod-wsgi-py3',
+ mod_path => '/usr/lib/apache2/modules/mod_wsgi.so',
+ },
+ default => $custom_mod_wsgi_parameters,
+ }
+ class { 'apache::mod::wsgi':
+ * => $wsgi,
+ }
}
$docroot = "${basedir}/puppetboard"