Skip to content
Snippets Groups Projects
Commit 31fa3345 authored by Thomas Bellman's avatar Thomas Bellman
Browse files

Make mod_* classes parametrized.

Add parameters $options and $directives to the mod_ssl, mod_perl and
mod_wsgi classes.  This allows users to specify options and directives
to the modules without having to introduce extra classes inheriting
our mod_* classes and overriding the apache::module::globalconfig
declarations we have.

This seems to be somewhat more in line with current thinking in the
Puppet community as well.
parent 33f41a23
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
/* /*
* Install the Apache mod_perl module. * Install the Apache mod_perl module.
*/ */
class apache::mod_perl class apache::mod_perl($options={}, $directives=[])
{ {
include apache include apache
...@@ -23,9 +23,9 @@ class apache::mod_perl ...@@ -23,9 +23,9 @@ class apache::mod_perl
apache::module::globalconfig { apache::module::globalconfig {
'perl': 'perl':
loadmodule => 'perl_module modules/mod_perl.so', loadmodule => 'perl_module modules/mod_perl.so',
directives => [], directives => $directives,
defaultoptions => $default_options, defaultoptions => $default_options,
options => { }, options => $options,
require => Package['mod_perl']; require => Package['mod_perl'];
} }
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Note that unlike the ssl.conf that comes with the normal mod_ssl * Note that unlike the ssl.conf that comes with the normal mod_ssl
* package, we do not add a 'Listen 443' directive. * package, we do not add a 'Listen 443' directive.
*/ */
class apache::mod_ssl class apache::mod_ssl($options={}, $directives=[])
{ {
include apache include apache
...@@ -33,9 +33,9 @@ class apache::mod_ssl ...@@ -33,9 +33,9 @@ class apache::mod_ssl
apache::module::globalconfig { apache::module::globalconfig {
'ssl': 'ssl':
loadmodule => 'ssl_module modules/mod_ssl.so', loadmodule => 'ssl_module modules/mod_ssl.so',
directives => [], directives => $directives,
defaultoptions => $default_options, defaultoptions => $default_options,
options => { }, options => $options,
require => Package['mod_ssl']; require => Package['mod_ssl'];
} }
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
/* /*
* Install the Apache mod_wsgi module for running Python WSGI applications. * Install the Apache mod_wsgi module for running Python WSGI applications.
*/ */
class apache::mod_wsgi class apache::mod_wsgi($options={}, $directives=[])
{ {
include apache include apache
...@@ -22,9 +22,9 @@ class apache::mod_wsgi ...@@ -22,9 +22,9 @@ class apache::mod_wsgi
apache::module::globalconfig { apache::module::globalconfig {
'wsgi': 'wsgi':
loadmodule => 'wsgi_module modules/mod_wsgi.so', loadmodule => 'wsgi_module modules/mod_wsgi.so',
directives => [], directives => $directives,
defaultoptions => $default_options, defaultoptions => $default_options,
options => { }, options => $options,
require => Package['mod_wsgi']; require => Package['mod_wsgi'];
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment