From 9be8ade5aa20ca0341fc64f42e6229b0fab87976 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Mon, 21 Sep 2015 15:47:46 +0200 Subject: [PATCH] allow absence of DocumentRoot DocumentRoot is useless for a plain redirect or proxy vhost, no need to force creating the directory. Signed-off-by: Julien Cristau --- apache/vhosts/standard.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apache/vhosts/standard.sls b/apache/vhosts/standard.sls index cfcf7fa..7d117c1 100644 --- a/apache/vhosts/standard.sls +++ b/apache/vhosts/standard.sls @@ -21,11 +21,13 @@ include: - watch_in: - module: apache-reload +{% if site.get('DocumentRoot') != False %} {{ id }}-documentroot: file.directory: - unless: test -d {{ documentroot }} - name: {{ documentroot }} - makedirs: True +{% endif %} {% if grains.os_family == 'Debian' %} {% if site.get('enabled') %}