blob: 08be69072627a5b92eb70f827c26f19151063d40 [file] [log] [blame]
{% set server = salt['grains.filter_by']({
'Debian': {
'pkgs': ['apache2'],
'service': 'apache2',
'mod_wsgi': 'libapache2-mod-wsgi',
'mod_php': 'libapache2-mod-php5',
'mod_perl': 'libapache2-mod-perl2',
'mod_xsendfile': 'libapache2-mod-xsendfile',
'mod_auth_kerb': 'libapache2-mod-auth-kerb',
'htpasswd_dir': '/etc/apache2',
'vhost_dir': '/etc/apache2/sites-available',
'conf_dir': '/etc/apache2/conf.d',
'conf_ext': '.conf',
'log_dir': '/var/log/apache2',
'wwwdir': '/srv',
'user': 'www-data',
'group': 'www-data',
},
'Arch': {
'pkgs': ['apache'],
'service': 'httpd',
'mod_wsgi': 'wsgi-apache',
'mod_php': 'php-apache',
'vhost_dir': '/etc/httpd/conf/extra',
'htpasswd_dir': '/etc/httpd',
'conf_dir': '/etc/httpd/conf',
'conf_ext': '.conf',
'log_dir': '/var/log/httpd',
'wwwdir': '/srv',
'user': 'apache',
'group': 'apache',
},
'RedHat': {
'pkgs': ['httpd'],
'service': 'httpd',
'mod_wsgi': 'mod_wsgi',
'vhost_dir': '/etc/httpd/conf.d',
'htpasswd_dir': '/etc/httpd',
'conf_dir': '/etc/httpd/conf.d',
'conf_ext': '.conf',
'log_dir': '/var/log/httpd',
'www_dir': '/var/www',
'user': 'apache',
'group': 'apache',
},
'FreeBSD': {
'pkgs': ['apache22'],
'service': 'apache22',
'mod_wsgi': 'ap22-mod_wsgi3',
'vhost_dir': '/usr/local/etc/apache22/Includes',
'htpasswd_dir': '/usr/local/etc/apache22',
'conf_dir': '/usr/local/etc/apache22/Includes',
'conf_ext': '',
'log_dir': '/var/log/',
'www_dir': '/usr/local/www/apache22/',
'user': 'apache',
'group': 'apache',
},
}, merge=salt['pillar.get']('apache:server')) %}
{%- set listen_ports = {} %}
{%- if server.site is defined %}
{%- for site_name, site in server.site.iteritems() %}
{%- if site.host.get('port', 80) %}
{%- set dummy=listen_ports.update({site.host.get('port', 80): None}) %}
{%- endif %}
{%- endfor %}
{%- endif %}