From 873d86cadbaf67c4eac6bb6e0c46576a0ac57f8a Mon Sep 17 00:00:00 2001 From: Elias Probst Date: Fri, 28 Aug 2015 13:25:21 +0200 Subject: [PATCH] Use 'apache.confext' instead of hardcoding '.conf' --- apache/register_site.sls | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apache/register_site.sls b/apache/register_site.sls index 97df321..bb79134 100644 --- a/apache/register_site.sls +++ b/apache/register_site.sls @@ -1,3 +1,4 @@ +{% from "apache/map.jinja" import apache with context %} {% if grains['os_family']=="Debian" %} {% if 'apache' in pillar and 'register-site' in pillar['apache'] %} #BEGIN: ['apache']['register-site'] @@ -15,14 +16,14 @@ {{ a2modid }}: cmd.run: {% if pillar['apache']['register-site'][site]['state'] == 'enabled' %} - - unless: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}.conf + - unless: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}{{ apache.confext }} {% else %} - - onlyif: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}.conf + - onlyif: test -f /etc/apache2/sites-enabled/{{ pillar['apache']['register-site'][site]['name'] }}{{ apache.confext }} {% endif %} - order: 230 - require: - pkg: apache - - file: /etc/apache2/sites-available/{{ pillar['apache']['register-site'][site]['name'] }}.conf + - file: /etc/apache2/sites-available/{{ pillar['apache']['register-site'][site]['name'] }}{{ apache.confext }} {% endif %} ##########################################