瀏覽代碼

Added a mod_wsgi state

master
Seth House 11 年之前
父節點
當前提交
5550f85bd9
共有 2 個文件被更改,包括 20 次插入0 次删除
  1. +2
    -0
      README.rst
  2. +18
    -0
      apache/mod_wsgi.sls

+ 2
- 0
README.rst 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存