-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgeoip.yml
47 lines (43 loc) · 1.09 KB
/
geoip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# http://dev.maxmind.com/geoip/geolite
---
- hosts: all
tasks:
### REDHAT
- name: Install GeoIP packages
yum: name=$item
state=installed
with_items:
- GeoIP
- mod_geoip
- python-GeoIP
when: ansible_os_family == "RedHat"
tags:
- packages
### DEBIAN
- name: Install GeoIP packages
apt: name=$item
state=installed
with_items:
- geoclue-ubuntu-geoip
- geoip-bin
- geoip-database
- python-geoip
when: ansible_os_family == "Debian"
tags:
- packages
### CONFIGURATION
- name: Download databases
get_url: url=http://geolite.maxmind.com/download/geoip/database/$item dest=/usr/share/GeoIP
with_items:
- GeoLiteCountry/GeoIP.dat.gz
- GeoIPv6.dat.gz
- GeoLiteCity.dat.gz
- GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
- asnum/GeoIPASNum.dat.gz
- asnum/GeoIPASNumv6.dat.gz
tags:
- databases
- name: Uncompress databases
shell: gunzip -f /usr/share/GeoIP/*.gz
tags:
- config