Merge pull request #228 from ze42/docroot_sitename

DocumentRoot: fallback to SiteName like templates
This commit is contained in:
Niels Abspoel 2018-08-17 19:39:51 +02:00 committed by GitHub
commit ac7e71bf56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ include:
- apache
{% for id, site in salt['pillar.get']('apache:sites', {}).items() %}
{% set documentroot = site.get('DocumentRoot', '{0}/{1}'.format(apache.wwwdir, id)) %}
{% set documentroot = site.get('DocumentRoot', '{0}/{1}'.format(apache.wwwdir, site.get('ServerName', id))) %}
{{ id }}:
file: