@@ -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. | |||
@@ -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 %} |