5dc9d42ea6
This is more reliable than version numbers which might change with point releases (in particular for Debian Jessie) and is more likely to not conflict between multiple OS.
83 lines
2.3 KiB
Django/Jinja
83 lines
2.3 KiB
Django/Jinja
{% set apache = salt['grains.filter_by']({
|
|
'Debian': {
|
|
'server': 'apache2',
|
|
'service': 'apache2',
|
|
|
|
'mod_wsgi': 'libapache2-mod-wsgi',
|
|
|
|
'vhostdir': '/etc/apache2/sites-available',
|
|
'confdir': '/etc/apache2/conf.d',
|
|
'confext': '',
|
|
'default_site': 'default',
|
|
'default_site_ssl': 'default-ssl',
|
|
'logdir': '/var/log/apache2',
|
|
'wwwdir': '/srv',
|
|
'use_require': False,
|
|
},
|
|
'RedHat': {
|
|
'server': 'httpd',
|
|
'service': 'httpd',
|
|
|
|
'mod_wsgi': 'mod_wsgi',
|
|
|
|
'vhostdir': '/etc/httpd/conf.d',
|
|
'confdir': '/etc/httpd/conf.d',
|
|
'confext': '.conf',
|
|
'default_site': 'default',
|
|
'default_site_ssl': 'default-ssl',
|
|
'logdir': '/var/log/httpd',
|
|
'wwwdir': '/var/www',
|
|
'use_require': False,
|
|
},
|
|
'Suse': {
|
|
'server': 'apache2',
|
|
'service': 'apache2',
|
|
|
|
'mod_wsgi': 'apache2-mod_wsgi',
|
|
|
|
'vhostdir': '/etc/apache2/vhosts.d',
|
|
'confdir': '/etc/httpd/conf.d',
|
|
'confext': '.conf',
|
|
'default_site': 'vhost.template',
|
|
'default_site_ssl': 'vhost-ssl.template',
|
|
'logdir': '/var/log/apache2',
|
|
'wwwdir': '/srv/www',
|
|
'use_require': True,
|
|
},
|
|
'FreeBSD': {
|
|
'server': 'apache22',
|
|
'service': 'apache22',
|
|
|
|
'mod_wsgi': 'ap22-mod_wsgi3',
|
|
|
|
'vhostdir': '/usr/local/etc/apache22/Includes',
|
|
'confdir': '/usr/local/etc/apache22/Includes',
|
|
'confext': '',
|
|
'default_site': 'default',
|
|
'default_site_ssl': 'default-ssl',
|
|
'logdir': '/var/log/',
|
|
'wwwdir': '/usr/local/www/apache22/',
|
|
'use_require': False,
|
|
},
|
|
}, merge=salt['grains.filter_by']({
|
|
'trusty': {
|
|
'confext': '.conf',
|
|
'default_site': '000-default.conf',
|
|
'default_site_ssl': 'default-ssl.conf',
|
|
'use_require': True,
|
|
},
|
|
'utopic': {
|
|
'confext': '.conf',
|
|
'default_site': '000-default.conf',
|
|
'default_site_ssl': 'default-ssl.conf',
|
|
'use_require': True,
|
|
},
|
|
'jessie': {
|
|
'wwwdir': '/var/www',
|
|
'confext': '.conf',
|
|
'default_site': '000-default.conf',
|
|
'default_site_ssl': 'default-ssl.conf',
|
|
'use_require': True,
|
|
},
|
|
}, grain='oscodename', merge=salt['pillar.get']('apache:lookup'))) %}
|