From 0ed8f9a94b22d19b299e1b9a1fd5b75d70f0e8ec Mon Sep 17 00:00:00 2001 From: "Adrien \"ze\" Urban" Date: Tue, 22 May 2018 15:19:52 +0200 Subject: [PATCH] DocumentRoot: fallback to SiteName like templates Templates already fallback to SiteName before site id. This attemps to be consistent with them, and avoid having to explicitly specify the DocumentRoot, when the template already does the proper inference. --- apache/vhosts/standard.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache/vhosts/standard.sls b/apache/vhosts/standard.sls index 5ccd137..4d77aa6 100644 --- a/apache/vhosts/standard.sls +++ b/apache/vhosts/standard.sls @@ -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: