Skip to content
Snippets Groups Projects
Commit 9102fa64 authored by Kent Engström's avatar Kent Engström Committed by Thomas Bellman
Browse files

New class apache::mod_wsgi for using Python WSGI applications.

parent 08d23169
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2014 Kent Engström, Thomas Bellman.
# Licensed under the GNU LGPL v3+; see the README file for more information.
/*
* Install the Apache mod_wsgi module for running Python WSGI applications.
*/
class apache::mod_wsgi
{
include apache
$default_options = {
# Default WSGISocketPrefix value broken on at least RHEL/Fedora
'WSGISocketPrefix' => 'run/wsgi',
}
package {
'mod_wsgi':
ensure => installed,
# We want conf.d to be cleaned up from whatever mod_wsgi puts there
before => File[$apache::configdir];
}
apache::module::globalconfig {
'wsgi':
loadmodule => 'wsgi_module modules/mod_wsgi.so',
directives => [],
defaultoptions => $default_options,
options => { },
require => Package['mod_wsgi'];
}
}
class apache::mod_wsgi::absent
inherits apache::mod_wsgi
{
# Remove the configuration referencing the module before the actual
# module, in case the machine reboots in the middle.
Package['mod_wsgi'] {
ensure => absent,
before => [],
}
Apache::Module::Globalconfig['wsgi'] {
ensure => absent,
require => [],
before => Package['mod_wsgi'],
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment