Merge pull request #62 from svc-design/codex/disable-geoip-in-openresty-roles
feat: disable GeoIP setup for OpenResty role
This commit is contained in:
commit
3b2c6f2525
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
|
state: present
|
||||||
update_cache: true
|
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
|
- name: Ensure sites-available directory exists
|
||||||
file:
|
file:
|
||||||
path: /usr/local/openresty/nginx/conf/sites-available
|
path: /usr/local/openresty/nginx/conf/sites-available
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user