Added a mod_wsgi state

This commit is contained in:
Seth House 2013-08-13 16:51:38 -06:00
parent ee72d30b06
commit 5550f85bd9
2 changed files with 20 additions and 0 deletions

View File

@ -13,6 +13,8 @@ Available states
``apache`` ``apache``
Installs the Apache package and starts the service. Installs the Apache package and starts the service.
``apache.mod_wsgi``
Installs the mod_wsgi package and enables the Apache module.
``apache.debian_full`` ``apache.debian_full``
Installs and configures Apache on Debian and Ubuntu systems. Installs and configures Apache on Debian and Ubuntu systems.

18
apache/mod_wsgi.sls Normal file
View File

@ -0,0 +1,18 @@
{% set pkg = salt['grains.filter_by']({
'Debian': {'name': 'libapache2-mod-wsgi'},
'RedHat': {'name': 'mod_wsgi'},
}) %}
mod_wsgi:
pkg:
- installed
- name: {{ pkg.name }}
{% if grains.get('os_family') == 'RedHat' %}
/etc/httpd/conf.d/wsgi.conf:
file:
- uncomment
- regex: LoadModule
- require:
- pkg: mod_wsgi
{% endif %}