From c07e5846a47b88821194ff9ed2a1ab3acbfeb03b Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Tue, 11 Sep 2018 09:43:15 +0200 Subject: [PATCH 1/2] [vhosts/standard] improve uniqueness of section id --- apache/vhosts/standard.sls | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apache/vhosts/standard.sls b/apache/vhosts/standard.sls index 719f3b5..ecd7e3c 100644 --- a/apache/vhosts/standard.sls +++ b/apache/vhosts/standard.sls @@ -6,9 +6,8 @@ include: {% for id, site in salt['pillar.get']('apache:sites', {}).items() %} {% set documentroot = site.get('DocumentRoot', '{0}/{1}'.format(apache.wwwdir, site.get('ServerName', id))) %} -{{ id }}: - file: - - managed +{{ id }}-vhosts: + file.managed: - name: {{ apache.vhostdir }}/{{ id }}{{ apache.confext }} - source: {{ site.get('template_file', 'salt://apache/vhosts/standard.tmpl') }} - template: {{ site.get('template_engine', 'jinja') }} From feadd58f8537fe070bd245e50238f9b616c6b2a5 Mon Sep 17 00:00:00 2001 From: Arthur Lutz Date: Tue, 11 Sep 2018 12:52:30 +0200 Subject: [PATCH 2/2] [standard/vhost] unique id renamed --- 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 ecd7e3c..6ce2484 100644 --- a/apache/vhosts/standard.sls +++ b/apache/vhosts/standard.sls @@ -6,7 +6,7 @@ include: {% for id, site in salt['pillar.get']('apache:sites', {}).items() %} {% set documentroot = site.get('DocumentRoot', '{0}/{1}'.format(apache.wwwdir, site.get('ServerName', id))) %} -{{ id }}-vhosts: +apache_vhosts_{{ id }}: file.managed: - name: {{ apache.vhostdir }}/{{ id }}{{ apache.confext }} - source: {{ site.get('template_file', 'salt://apache/vhosts/standard.tmpl') }}