fix: update database movement and cleanup tasks for EchoIP service
This commit is contained in:
parent
57de662fff
commit
0b54e1b534
@ -85,17 +85,17 @@
|
||||
# Move all databases to the correct locations
|
||||
- name: Move ASN database to correct location
|
||||
ansible.builtin.command:
|
||||
cmd: "mv {{ echoip_data_dir }}/GeoLite2-ASN/GeoLite2-ASN.mmdb {{ echoip_data_dir }}/GeoLite2-ASN.mmdb"
|
||||
cmd: "find {{ echoip_data_dir }}/GeoLite2-ASN -name GeoLite2-ASN.mmdb -exec mv {} {{ echoip_data_dir }}/GeoLite2-ASN.mmdb \\;"
|
||||
when: asn_extracted.changed
|
||||
|
||||
- name: Move City database to correct location
|
||||
ansible.builtin.command:
|
||||
cmd: "mv {{ echoip_data_dir }}/GeoLite2-City/GeoLite2-City.mmdb {{ echoip_data_dir }}/GeoLite2-City.mmdb"
|
||||
cmd: "find {{ echoip_data_dir }}/GeoLite2-City -name GeoLite2-City.mmdb -exec mv {} {{ echoip_data_dir }}/GeoLite2-City.mmdb \\;"
|
||||
when: city_extracted.changed
|
||||
|
||||
- name: Move Country database to correct location
|
||||
ansible.builtin.command:
|
||||
cmd: "mv {{ echoip_data_dir }}/GeoLite2-Country/GeoLite2-Country.mmdb {{ echoip_data_dir }}/GeoLite2-Country.mmdb"
|
||||
cmd: "find {{ echoip_data_dir }}/GeoLite2-Country -name GeoLite2-Country.mmdb -exec mv {} {{ echoip_data_dir }}/GeoLite2-Country.mmdb \\;"
|
||||
when: country_extracted.changed
|
||||
|
||||
# Clean up unnecessary files
|
||||
@ -105,9 +105,8 @@
|
||||
state: absent
|
||||
|
||||
- name: Remove extracted ASN folder
|
||||
ansible.builtin.file:
|
||||
path: "{{ echoip_data_dir }}/GeoLite2-ASN"
|
||||
state: absent
|
||||
ansible.builtin.command:
|
||||
cmd: "rm -rf {{ echoip_data_dir }}/GeoLite2-ASN"
|
||||
|
||||
- name: Remove downloaded City tar.gz file
|
||||
ansible.builtin.file:
|
||||
@ -115,9 +114,8 @@
|
||||
state: absent
|
||||
|
||||
- name: Remove extracted City folder
|
||||
ansible.builtin.file:
|
||||
path: "{{ echoip_data_dir }}/GeoLite2-City"
|
||||
state: absent
|
||||
ansible.builtin.command:
|
||||
cmd: "rm -rf {{ echoip_data_dir }}/GeoLite2-City"
|
||||
|
||||
- name: Remove downloaded Country tar.gz file
|
||||
ansible.builtin.file:
|
||||
@ -125,9 +123,8 @@
|
||||
state: absent
|
||||
|
||||
- name: Remove extracted Country folder
|
||||
ansible.builtin.file:
|
||||
path: "{{ echoip_data_dir }}/GeoLite2-Country"
|
||||
state: absent
|
||||
ansible.builtin.command:
|
||||
cmd: "rm -rf {{ echoip_data_dir }}/GeoLite2-Country"
|
||||
|
||||
# Deploy and restart the EchoIP service
|
||||
- name: Deploy EchoIP docker-compose.yml
|
||||
|
Loading…
x
Reference in New Issue
Block a user