feat: disable GeoIP setup for OpenResty role

This commit is contained in:
shenlan 2025-08-19 13:06:41 +08:00
parent c0559f370a
commit 4cc07a4a68
2 changed files with 23 additions and 24 deletions

View 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

View File

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