From 7ac28f42f953fdf5bc5ac0dabfc44deb15b2d55b Mon Sep 17 00:00:00 2001 From: Oleksandr Porunov Date: Thu, 6 Apr 2017 15:03:37 +0300 Subject: [PATCH 1/2] Clear uncomment state of mod_wsgi config --- apache/map.jinja | 1 + apache/mod_wsgi.sls | 8 ++++---- apache/osfingermap.yaml | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apache/map.jinja b/apache/map.jinja index 7dcd50c..a623556 100644 --- a/apache/map.jinja +++ b/apache/map.jinja @@ -54,6 +54,7 @@ 'configfile': '/etc/httpd/conf/httpd.conf', 'mod_wsgi': 'mod_wsgi', + 'conf_mod_wsgi': '/etc/httpd/conf.d/wsgi.conf', 'mod_php5': 'php', 'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm', diff --git a/apache/mod_wsgi.sls b/apache/mod_wsgi.sls index bda0274..1b48660 100644 --- a/apache/mod_wsgi.sls +++ b/apache/mod_wsgi.sls @@ -9,11 +9,11 @@ mod_wsgi: - require: - pkg: apache -{% if grains.get('os_family') == 'RedHat' %} -/etc/httpd/conf.d/wsgi.conf: +{% if apache.conf_mod_wsgi %} +{{ apache.conf_mod_wsgi }}: file.uncomment: - regex: LoadModule - - onlyif: test -f /etc/httpd/conf.d/wsgi.conf + - onlyif: test -f {{ apache.conf_mod_wsgi }} - require: - pkg: mod_wsgi -{% endif %} +{% endif %} \ No newline at end of file diff --git a/apache/osfingermap.yaml b/apache/osfingermap.yaml index abef80b..9b77b89 100644 --- a/apache/osfingermap.yaml +++ b/apache/osfingermap.yaml @@ -10,6 +10,7 @@ CentOS Linux-6: version: '2.2' CentOS Linux-7: version: '2.4' + conf_mod_wsgi: '/etc/httpd/conf.modules.d/10-wsgi.conf' Oracle Linux Server-6: version: '2.2' Oracle Linux Server-7: From ee6b910302296befa10a1efbe65727ce0248a4b7 Mon Sep 17 00:00:00 2001 From: Oleksandr Porunov Date: Thu, 6 Apr 2017 15:11:32 +0300 Subject: [PATCH 2/2] Format mod_wsgi state --- apache/mod_wsgi.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache/mod_wsgi.sls b/apache/mod_wsgi.sls index 1b48660..aa3fd21 100644 --- a/apache/mod_wsgi.sls +++ b/apache/mod_wsgi.sls @@ -16,4 +16,4 @@ mod_wsgi: - onlyif: test -f {{ apache.conf_mod_wsgi }} - require: - pkg: mod_wsgi -{% endif %} \ No newline at end of file +{% endif %}