From 3f8a1edb9765844b64a71f98eb23f9178507a4fd Mon Sep 17 00:00:00 2001 From: Seth House Date: Mon, 26 Aug 2013 20:45:38 -0600 Subject: [PATCH] Added mod_wsgi to package-map --- apache/mod_wsgi.sls | 7 ++----- apache/package-map.jinja | 2 ++ pillar.example | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apache/mod_wsgi.sls b/apache/mod_wsgi.sls index 9ce74d6..35ccfed 100644 --- a/apache/mod_wsgi.sls +++ b/apache/mod_wsgi.sls @@ -1,12 +1,9 @@ -{% set pkg = salt['grains.filter_by']({ - 'Debian': {'name': 'libapache2-mod-wsgi'}, - 'RedHat': {'name': 'mod_wsgi'}, -}) %} +{% from "apache/package-map.jinja" import apache with context %} mod_wsgi: pkg: - installed - - name: {{ pkg.name }} + - name: {{ apache.mod_wsgi }} {% if grains.get('os_family') == 'RedHat' %} /etc/httpd/conf.d/wsgi.conf: diff --git a/apache/package-map.jinja b/apache/package-map.jinja index 3d4d6f6..3243249 100644 --- a/apache/package-map.jinja +++ b/apache/package-map.jinja @@ -3,10 +3,12 @@ 'server': 'apache2', 'service': 'apache2', 'conf': '/etc/apache2/conf.d', + 'mod_wsgi': 'libapache2-mod-wsgi', }, 'RedHat': { 'server': 'httpd', 'service': 'httpd', 'conf': '/etc/httpd/conf.d', + 'mod_wsgi': 'mod_wsgi', }, }, merge=salt['pillar.get']('apache:lookup')) %} diff --git a/pillar.example b/pillar.example index df08ce4..4a79e0b 100644 --- a/pillar.example +++ b/pillar.example @@ -3,6 +3,7 @@ apache: server: apache2 service: apache2 conf: /etc/apache2/conf.d + mod_wsgi: mod_wsgi # ``apache.debian_full`` formula additional configuration: apache: