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

Add class apache::mod_perl for managing the mod_perl module.

parent 00148adb
No related branches found
No related tags found
No related merge requests found
import "apache"
/*
* Install the Apache mod_perl module.
*/
class apache::mod_perl
{
include apache
$default_options = {
# Enable taint checking by default. Lots of Perl modules fail with
# this, though, so users may need to disable this.
'PerlSwitches' => '-T',
}
package {
'mod_perl':
ensure => installed,
# We want conf.d to be cleaned up from whatever mod_perl puts there
before => File[$apache::configdir];
}
apache::module::globalconfig {
'perl':
loadmodule => 'perl_module modules/mod_perl.so',
directives => [],
defaultoptions => $default_options,
options => { },
require => Package['mod_perl'];
}
}
/*
* As apache::mod_perl, but do not run Perl in taint mode.
*/
class apache::mod_perl::notaint
inherits apache::mod_perl
{
Apache::Module::Globalconfig['perl'] {
defaultoptions => { },
}
}
class apache::mod_perl::absent
inherits apache::mod_perl
{
# Remove the configuration referencing the module before the actual
# module, in case the machine reboots in the middle.
Package['mod_perl'] {
ensure => absent,
before => [],
}
Apache::Module::Globalconfig['perl'] {
ensure => absent,
require => [],
before => Package['mod_perl'],
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment