Browse Source

Added a mod_wsgi state

master
Seth House 11 years ago
parent
commit
5550f85bd9
2 changed files with 20 additions and 0 deletions
  1. +2
    -0
      README.rst
  2. +18
    -0
      apache/mod_wsgi.sls

+ 2
- 0
README.rst View File

@@ -13,6 +13,8 @@ Available states

``apache``
Installs the Apache package and starts the service.
``apache.mod_wsgi``
Installs the mod_wsgi package and enables the Apache module.
``apache.debian_full``
Installs and configures Apache on Debian and Ubuntu systems.


+ 18
- 0
apache/mod_wsgi.sls 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 %}

Loading…
Cancel
Save