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
|
# Move all databases to the correct locations
|
||||||
- name: Move ASN database to correct location
|
- name: Move ASN database to correct location
|
||||||
ansible.builtin.command:
|
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
|
when: asn_extracted.changed
|
||||||
|
|
||||||
- name: Move City database to correct location
|
- name: Move City database to correct location
|
||||||
ansible.builtin.command:
|
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
|
when: city_extracted.changed
|
||||||
|
|
||||||
- name: Move Country database to correct location
|
- name: Move Country database to correct location
|
||||||
ansible.builtin.command:
|
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
|
when: country_extracted.changed
|
||||||
|
|
||||||
# Clean up unnecessary files
|
# Clean up unnecessary files
|
||||||
@ -105,9 +105,8 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Remove extracted ASN folder
|
- name: Remove extracted ASN folder
|
||||||
ansible.builtin.file:
|
ansible.builtin.command:
|
||||||
path: "{{ echoip_data_dir }}/GeoLite2-ASN"
|
cmd: "rm -rf {{ echoip_data_dir }}/GeoLite2-ASN"
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Remove downloaded City tar.gz file
|
- name: Remove downloaded City tar.gz file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -115,9 +114,8 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Remove extracted City folder
|
- name: Remove extracted City folder
|
||||||
ansible.builtin.file:
|
ansible.builtin.command:
|
||||||
path: "{{ echoip_data_dir }}/GeoLite2-City"
|
cmd: "rm -rf {{ echoip_data_dir }}/GeoLite2-City"
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Remove downloaded Country tar.gz file
|
- name: Remove downloaded Country tar.gz file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -125,9 +123,8 @@
|
|||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Remove extracted Country folder
|
- name: Remove extracted Country folder
|
||||||
ansible.builtin.file:
|
ansible.builtin.command:
|
||||||
path: "{{ echoip_data_dir }}/GeoLite2-Country"
|
cmd: "rm -rf {{ echoip_data_dir }}/GeoLite2-Country"
|
||||||
state: absent
|
|
||||||
|
|
||||||
# Deploy and restart the EchoIP service
|
# Deploy and restart the EchoIP service
|
||||||
- name: Deploy EchoIP docker-compose.yml
|
- name: Deploy EchoIP docker-compose.yml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user