Skip to content
Snippets Groups Projects
Unverified Commit 32f92e8a authored by Niels Abspoel's avatar Niels Abspoel Committed by GitHub
Browse files

Merge pull request #227 from ze42/geoip_debian

geoip: Debian support
parents 03de9808 4e15435e
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb', 'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb',
'mod_xsendfile': 'libapache2-mod-xsendfile', 'mod_xsendfile': 'libapache2-mod-xsendfile',
'mod_fastcgi': 'libapache2-mod-fastcgi', 'mod_fastcgi': 'libapache2-mod-fastcgi',
'mod_geoip': 'libapache2-mod-geoip',
'mod_geoip_database': 'geoip-database',
'vhostdir': '/etc/apache2/sites-available', 'vhostdir': '/etc/apache2/sites-available',
'confdir': '/etc/apache2/conf-available', 'confdir': '/etc/apache2/conf-available',
...@@ -59,6 +61,8 @@ ...@@ -59,6 +61,8 @@
'mod_php5': 'php', 'mod_php5': 'php',
'mod_fcgid': 'mod_fcgid', 'mod_fcgid': 'mod_fcgid',
'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm', 'mod_pagespeed_source': 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm',
'mod_geoip': 'mod_geoip',
'mod_geoip_database': 'GeoIP',
'vhostdir': '/etc/httpd/vhosts.d', 'vhostdir': '/etc/httpd/vhosts.d',
'confdir': '/etc/httpd/conf.d', 'confdir': '/etc/httpd/conf.d',
......
{% from "apache/map.jinja" import apache with context %} {% from "apache/map.jinja" import apache with context %}
{% if grains['os_family']=="RedHat" %} {% if 'mod_geoip' in apache %}
include: include:
- apache - apache
...@@ -8,14 +8,15 @@ include: ...@@ -8,14 +8,15 @@ include:
mod-geoip: mod-geoip:
pkg.installed: pkg.installed:
- pkgs: - pkgs:
- GeoIP - {{ apache.mod_geoip }}
- mod_geoip - {{ apache.mod_geoip_database }}
- require: - require:
- pkg: apache - pkg: apache
- watch_in: - watch_in:
- module: apache-restart - module: apache-restart
{% if grains['os_family']=="RedHat" %}
geoip conf: geoip conf:
file.managed: file.managed:
- name: {{ apache.confdir }}/geoip.conf - name: {{ apache.confdir }}/geoip.conf
...@@ -35,4 +36,4 @@ geoip database: ...@@ -35,4 +36,4 @@ geoip database:
- salt://apache/files/{{ salt['grains.get']('os_family') }}/GeoIP.dat - salt://apache/files/{{ salt['grains.get']('os_family') }}/GeoIP.dat
{% endif %} {% endif %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment