apache-formula/apache/map.jinja

205 lines
6.4 KiB
Plaintext
Raw Normal View History

{% import_yaml "apache/osfingermap.yaml" as osfingermap %}
{% import_yaml "apache/modsecurity.yaml" as modsec %}
2013-08-23 05:14:28 +02:00
{% set apache = salt['grains.filter_by']({
'Gentoo': {
'server': 'www-servers/apache',
'service': 'apache2',
'user': 'apache',
'group': 'apache',
'configfile': '/etc/apache2/httpd.conf',
'mod_wsgi': 'www-apache/mod_wsgi',
'mod_fcgid': 'www-apache/mod_fcgid',
'vhostdir': '/etc/apache2/vhosts.d',
'confdir': '/etc/conf.d/apache2',
'confext': '.conf',
'default_site': 'default',
'default_site_ssl': 'default-ssl',
'logdir': '/var/log/apache2',
'logrotatedir': '/etc/logrotate.d/apache2',
'wwwdir': '/var/www',
'use_require': False,
},
2013-08-23 05:14:28 +02:00
'Debian': {
'server': 'apache2',
'service': 'apache2',
'user': 'www-data',
'group': 'www-data',
'configfile': '/etc/apache2/apache2.conf',
2016-02-01 17:03:47 +01:00
'portsfile': '/etc/apache2/ports.conf',
2013-08-27 04:45:38 +02:00
'mod_wsgi': 'libapache2-mod-wsgi',
'mod_php5': 'libapache2-mod-php5',
2017-01-08 12:30:33 +01:00
'mod_perl2': 'libapache2-mod-perl2',
'mod_fcgid': 'libapache2-mod-fcgid',
'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb',
'mod_xsendfile': 'libapache2-mod-xsendfile',
'mod_fastcgi': 'libapache2-mod-fastcgi',
'vhostdir': '/etc/apache2/sites-available',
'confdir': '/etc/apache2/conf.d',
2015-04-17 14:39:57 +02:00
'confext': '.conf',
'default_site': 'default',
'default_site_ssl': 'default-ssl',
'logdir': '/var/log/apache2',
'logrotatedir': '/etc/logrotate.d/apache2',
'wwwdir': '/srv',
'use_require': False,
2013-08-23 05:14:28 +02:00
},
'RedHat': {
'server': 'httpd',
'service': 'httpd',
'user': 'apache',
'group': 'apache',
'configfile': '/etc/httpd/conf/httpd.conf',
2013-08-27 04:45:38 +02:00
'mod_wsgi': 'mod_wsgi',
'conf_mod_wsgi': '/etc/httpd/conf.d/wsgi.conf',
'mod_php5': 'php',
'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm',
'vhostdir': '/etc/httpd/vhosts.d',
'confdir': '/etc/httpd/conf.d',
'confext': '.conf',
'default_site': 'default',
'default_site_ssl': 'default-ssl',
'logdir': '/var/log/httpd',
'logrotatedir': '/etc/logrotate.d/httpd',
'wwwdir': '/var/www',
'default_charset': 'UTF-8',
'use_require': False,
2013-08-23 05:14:28 +02:00
},
2015-03-08 22:12:36 +01:00
'Suse': {
'server': 'apache2',
'service': 'apache2',
'user': 'apache',
'group': 'apache',
'configfile': '/etc/apache2/httpd.conf',
2015-03-08 22:12:36 +01:00
'mod_wsgi': 'apache2-mod_wsgi',
'mod_php5': 'apache2-mod_php5',
'mod_fcgid': 'apache2-mod_fcgid',
2015-03-08 22:12:36 +01:00
'vhostdir': '/etc/apache2/vhosts.d',
2017-03-17 13:49:55 +01:00
'confdir': '/etc/apache2/conf.d',
2015-03-08 22:12:36 +01:00
'confext': '.conf',
'default_site': 'vhost.template',
'default_site_ssl': 'vhost-ssl.template',
'logdir': '/var/log/apache2',
'wwwdir': '/srv/www',
'use_require': True,
},
2014-01-30 03:12:47 +01:00
'FreeBSD': {
'server': 'apache22',
'service': 'apache22',
'user': 'www',
'group': 'www',
'configfile': '/usr/local/etc/apache22/httpd.conf',
2016-09-26 23:51:47 +02:00
'portsfile': '/usr/local/etc/apache22/ports.conf',
2014-01-30 03:12:47 +01:00
2016-09-27 02:16:21 +02:00
'mod_php5': 'mod_php56',
2017-01-08 12:30:33 +01:00
'mod_perl2': 'ap22-mod_perl2',
2014-01-30 03:12:47 +01:00
'mod_wsgi': 'ap22-mod_wsgi3',
'vhostdir': '/usr/local/etc/apache22/Includes',
2017-01-05 16:41:04 +01:00
'confdir': '/usr/local/etc/apache22/extra',
2016-09-27 00:56:52 +02:00
'modulesdir': '/usr/local/etc/apache22/modules.d',
2016-09-27 02:00:41 +02:00
'global_document_root': '/usr/local/www/apache22/data',
'confext': '',
'default_site': 'default',
'default_site_ssl': 'default-ssl',
2014-01-30 03:12:47 +01:00
'logdir': '/var/log/',
'wwwdir': '/usr/local/www/apache22/',
'use_require': False,
2014-01-30 03:12:47 +01:00
},
}, merge=salt['grains.filter_by']({
2016-03-24 15:22:23 +01:00
'precise': {
'confext': '',
'default_site': 'default',
'default_site_ssl': 'default-ssl',
'use_require': True,
},
'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,
},
'vivid': {
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
'wily': {
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
'xenial': {
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
'yakkety': {
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
'zesty': {
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
'artful': {
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
'jessie': {
2015-01-10 16:18:59 +01:00
'wwwdir': '/var/www',
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
2015-01-10 16:18:59 +01:00
},
'stretch': {
'wwwdir': '/var/www',
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
'buster': {
'wwwdir': '/var/www',
'confext': '.conf',
'default_site': '000-default.conf',
'default_site_ssl': 'default-ssl.conf',
'use_require': True,
},
}, grain='oscodename', merge=salt['grains.filter_by'](
osfingermap
, grain='osfinger', merge=salt['pillar.get']('apache:lookup')))) %}
{% set modsecurity = salt['grains.filter_by'](
modsec
, grain='os_family', merge=salt['pillar.get']('apache:mod_security')) or {} %}
{# merge the os family/codename mod_sec's specific data over the defaults #}
{% do apache.update({ 'mod_security': modsecurity }) %}