feat: disable GeoIP setup for OpenResty role
This commit is contained in:
parent
c0559f370a
commit
4cc07a4a68
23
playbooks/roles/vhosts/OpenResty/tasks/geoip.yml
Normal file
23
playbooks/roles/vhosts/OpenResty/tasks/geoip.yml
Normal file
@ -0,0 +1,23 @@
|
||||
- name: Install GeoIP dependencies
|
||||
apt:
|
||||
name: luarocks
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Install lua-resty-maxminddb
|
||||
command: "luarocks install lua-resty-maxminddb"
|
||||
args:
|
||||
creates: /usr/local/openresty/site/lualib/resty/maxminddb.lua
|
||||
|
||||
- name: Ensure GeoIP database directory exists
|
||||
file:
|
||||
path: /usr/share/GeoIP
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
# yamllint disable rule:line-length
|
||||
- name: Download V2Fly GeoIP database
|
||||
get_url:
|
||||
url: https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
|
||||
dest: /usr/share/GeoIP/geoip.dat
|
||||
# yamllint enable rule:line-length
|
||||
@ -28,30 +28,6 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Install GeoIP dependencies
|
||||
apt:
|
||||
name: luarocks
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Install lua-resty-maxminddb
|
||||
command: "luarocks install lua-resty-maxminddb"
|
||||
args:
|
||||
creates: /usr/local/openresty/site/lualib/resty/maxminddb.lua
|
||||
|
||||
- name: Ensure GeoIP database directory exists
|
||||
file:
|
||||
path: /usr/share/GeoIP
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
# yamllint disable rule:line-length
|
||||
- name: Download V2Fly GeoIP database
|
||||
get_url:
|
||||
url: https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
|
||||
dest: /usr/share/GeoIP/geoip.dat
|
||||
# yamllint enable rule:line-length
|
||||
|
||||
- name: Ensure sites-available directory exists
|
||||
file:
|
||||
path: /usr/local/openresty/nginx/conf/sites-available
|
||||
|
||||
Loading…
Reference in New Issue
Block a user