Merge pull request #20 from adamherzog/redhat-vhost-config-extension

Add vhost config file extension for RedHat-based distributions
This commit is contained in:
Joseph Hall 2014-02-09 07:47:14 -07:00
commit 989ae09576
3 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@
'vhostdir': '/etc/apache2/sites-available', 'vhostdir': '/etc/apache2/sites-available',
'confdir': '/etc/apache2/conf.d', 'confdir': '/etc/apache2/conf.d',
'confext': '',
'logdir': '/var/log/apache2', 'logdir': '/var/log/apache2',
'wwwdir': '/srv', 'wwwdir': '/srv',
}, },
@ -18,6 +19,7 @@
'vhostdir': '/etc/httpd/conf.d', 'vhostdir': '/etc/httpd/conf.d',
'confdir': '/etc/httpd/conf.d', 'confdir': '/etc/httpd/conf.d',
'confext': '.conf',
'logdir': '/var/log/httpd', 'logdir': '/var/log/httpd',
'wwwdir': '/var/www', 'wwwdir': '/var/www',
}, },
@ -29,6 +31,7 @@
'vhostdir': '/usr/local/etc/apache22/Includes', 'vhostdir': '/usr/local/etc/apache22/Includes',
'confdir': '/usr/local/etc/apache22/Includes', 'confdir': '/usr/local/etc/apache22/Includes',
'confext': '',
'logdir': '/var/log/', 'logdir': '/var/log/',
'wwwdir': '/usr/local/www/apache22/', 'wwwdir': '/usr/local/www/apache22/',
}, },

View File

@ -8,7 +8,7 @@ include:
{{ id }}: {{ id }}:
file: file:
- managed - managed
- name: {{ apache.vhostdir }}/{{ id }} - name: {{ apache.vhostdir }}/{{ id }}{{ apache.confext }}
- source: {{ site.get('template_file', 'salt://apache/vhosts/standard.tmpl') }} - source: {{ site.get('template_file', 'salt://apache/vhosts/standard.tmpl') }}
- template: {{ site.get('template_engine', 'jinja') }} - template: {{ site.get('template_engine', 'jinja') }}
- context: - context:

View File

@ -3,7 +3,9 @@ apache:
server: apache2 server: apache2
service: apache2 service: apache2
vhostdir: /etc/apache2/sites-available
confdir: /etc/apache2/conf.d confdir: /etc/apache2/conf.d
confext: .conf
logdir: /var/log/apache2 logdir: /var/log/apache2
wwwdir: /srv/apache2 wwwdir: /srv/apache2