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

View file

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

View 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