From 1888584b943740529a9d498e624e7ee17b7d7f4b Mon Sep 17 00:00:00 2001 From: Adam Herzog Date: Sun, 9 Feb 2014 09:11:55 -0500 Subject: [PATCH 1/3] Add config file extension (confext) to parameter map. --- apache/map.jinja | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apache/map.jinja b/apache/map.jinja index 1685548..b5bcf93 100644 --- a/apache/map.jinja +++ b/apache/map.jinja @@ -7,6 +7,7 @@ 'vhostdir': '/etc/apache2/sites-available', 'confdir': '/etc/apache2/conf.d', + 'confext': '', 'logdir': '/var/log/apache2', 'wwwdir': '/srv', }, @@ -18,6 +19,7 @@ 'vhostdir': '/etc/httpd/conf.d', 'confdir': '/etc/httpd/conf.d', + 'confext': '.conf', 'logdir': '/var/log/httpd', 'wwwdir': '/var/www', }, @@ -29,6 +31,7 @@ 'vhostdir': '/usr/local/etc/apache22/Includes', 'confdir': '/usr/local/etc/apache22/Includes', + 'confext': '', 'logdir': '/var/log/', 'wwwdir': '/usr/local/www/apache22/', }, From be1aa5629ee0c44250793ae38d0b0d39eb66e1db Mon Sep 17 00:00:00 2001 From: Adam Herzog Date: Sun, 9 Feb 2014 09:12:31 -0500 Subject: [PATCH 2/3] Use confext parameter when naming vhost config files. --- 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 864c0ae..51f644d 100644 --- a/apache/vhosts/standard.sls +++ b/apache/vhosts/standard.sls @@ -8,7 +8,7 @@ include: {{ id }}: file: - managed - - name: {{ apache.vhostdir }}/{{ id }} + - name: {{ apache.vhostdir }}/{{ id }}{{ apache.confext }} - source: {{ site.get('template_file', 'salt://apache/vhosts/standard.tmpl') }} - template: {{ site.get('template_engine', 'jinja') }} - context: From 6a7448cb4b8a5bb311cf440604d9e5edc64998c6 Mon Sep 17 00:00:00 2001 From: Adam Herzog Date: Sun, 9 Feb 2014 09:13:00 -0500 Subject: [PATCH 3/3] Add confext (and missing vhostdir) parameters to pillar.example. --- pillar.example | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pillar.example b/pillar.example index 5968db5..9088175 100644 --- a/pillar.example +++ b/pillar.example @@ -3,7 +3,9 @@ apache: server: apache2 service: apache2 + vhostdir: /etc/apache2/sites-available confdir: /etc/apache2/conf.d + confext: .conf logdir: /var/log/apache2 wwwdir: /srv/apache2