This commit is contained in:
Alex Kotov 2023-08-29 22:56:08 +04:00
parent 00c7f572f0
commit 10ef6f10c5
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 19 additions and 1 deletions

1
files/conf.d/geoip.conf Normal file
View file

@ -0,0 +1 @@
geoip_country /usr/share/GeoIP/GeoIPv6.dat;

View file

@ -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:

View file

@ -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:

View file

@ -4,6 +4,8 @@
state: absent
purge: false
name:
- libnginx-mod-http-geoip
- nginx
- nginx-common
- nginx-core
- nginx-full