Merge pull request #49 from multani/fix-missing-documentroot

Don't fail on missing DocumentRoot
This commit is contained in:
Forrest 2015-03-25 19:25:11 -07:00
commit b190357ebf

View File

@ -20,11 +20,13 @@ include:
- watch_in: - watch_in:
- module: apache-reload - module: apache-reload
{% if 'DocumentRoot' in site %}
{{ id }}-documentroot: {{ id }}-documentroot:
file.directory: file.directory:
- unless: test -d {{ site.get('DocumentRoot') }} - unless: test -d {{ site.get('DocumentRoot') }}
- name: {{ site.get('DocumentRoot') }} - name: {{ site.get('DocumentRoot') }}
- makedirs: True - makedirs: True
{% endif %}
{% if grains.os_family == 'Debian' %} {% if grains.os_family == 'Debian' %}
a2ensite {{ id }}{{ apache.confext }}: a2ensite {{ id }}{{ apache.confext }}: