GeoIP
This commit is contained in:
parent
00c7f572f0
commit
10ef6f10c5
4 changed files with 19 additions and 1 deletions
1
files/conf.d/geoip.conf
Normal file
1
files/conf.d/geoip.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
geoip_country /usr/share/GeoIP/GeoIPv6.dat;
|
|
@ -1,7 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: Install Nginx
|
- name: Install Nginx
|
||||||
|
notify: nginx | Restart Nginx
|
||||||
apt:
|
apt:
|
||||||
name: nginx
|
name:
|
||||||
|
- geoip-database
|
||||||
|
- libnginx-mod-http-geoip
|
||||||
|
- nginx
|
||||||
|
|
||||||
- name: Create directories for Nginx configuration
|
- name: Create directories for Nginx configuration
|
||||||
notify: nginx | Restart Nginx
|
notify: nginx | Restart Nginx
|
||||||
|
@ -39,6 +43,15 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
|
- name: Install Nginx configs
|
||||||
|
notify: nginx | Restart Nginx
|
||||||
|
template:
|
||||||
|
src: 'files/conf.d/geoip.conf'
|
||||||
|
dest: '{{ nginx__confd_dir }}/geoip.conf'
|
||||||
|
mode: 'u=rw,go=r'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
- name: Install Nginx stream config
|
- name: Install Nginx stream config
|
||||||
notify: nginx | Restart Nginx
|
notify: nginx | Restart Nginx
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
state: absent
|
state: absent
|
||||||
purge: true
|
purge: true
|
||||||
name:
|
name:
|
||||||
|
- libnginx-mod-http-geoip
|
||||||
- nginx
|
- nginx
|
||||||
- nginx-common
|
- nginx-common
|
||||||
- nginx-core
|
- nginx-core
|
||||||
|
- nginx-full
|
||||||
|
|
||||||
- name: Delete Nginx configuration
|
- name: Delete Nginx configuration
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
state: absent
|
state: absent
|
||||||
purge: false
|
purge: false
|
||||||
name:
|
name:
|
||||||
|
- libnginx-mod-http-geoip
|
||||||
- nginx
|
- nginx
|
||||||
- nginx-common
|
- nginx-common
|
||||||
- nginx-core
|
- nginx-core
|
||||||
|
- nginx-full
|
||||||
|
|
Loading…
Reference in a new issue