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
|
||||
notify: nginx | Restart Nginx
|
||||
apt:
|
||||
name: nginx
|
||||
name:
|
||||
- geoip-database
|
||||
- libnginx-mod-http-geoip
|
||||
- nginx
|
||||
|
||||
- name: Create directories for Nginx configuration
|
||||
notify: nginx | Restart Nginx
|
||||
|
@ -39,6 +43,15 @@
|
|||
owner: 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
|
||||
notify: nginx | Restart Nginx
|
||||
copy:
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
state: absent
|
||||
purge: true
|
||||
name:
|
||||
- libnginx-mod-http-geoip
|
||||
- nginx
|
||||
- nginx-common
|
||||
- nginx-core
|
||||
- nginx-full
|
||||
|
||||
- name: Delete Nginx configuration
|
||||
file:
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
state: absent
|
||||
purge: false
|
||||
name:
|
||||
- libnginx-mod-http-geoip
|
||||
- nginx
|
||||
- nginx-common
|
||||
- nginx-core
|
||||
- nginx-full
|
||||
|
|
Loading…
Reference in a new issue