Skip to content

Commit fdfa211

Browse files
committed
fix: update GeoLite2 City archive handling to use dot notation for temporary path access
1 parent 5f64041 commit fdfa211

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tasks/configure.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
- name: Download GeoLite2 City archive
6767
ansible.builtin.get_url:
6868
url: https://download.maxmind.com/geoip/databases/GeoLite2-City/download?suffix=tar.gz
69-
dest: "{{ __fluentbit_geoip_tmp['path'] }}/GeoLite2-City.tar.gz"
69+
dest: "{{ __fluentbit_geoip_tmp.path }}/GeoLite2-City.tar.gz"
7070
mode: '0600'
7171
force: true
7272
force_basic_auth: true
@@ -76,25 +76,25 @@
7676

7777
- name: Extract GeoLite2 City archive
7878
ansible.builtin.unarchive:
79-
src: "{{ __fluentbit_geoip_tmp['path'] }}/GeoLite2-City.tar.gz"
80-
dest: "{{ __fluentbit_geoip_tmp['path'] }}"
79+
src: "{{ __fluentbit_geoip_tmp.path }}/GeoLite2-City.tar.gz"
80+
dest: "{{ __fluentbit_geoip_tmp.path }}"
8181
remote_src: true
8282

8383
- name: Locate GeoLite2 City database file
8484
ansible.builtin.find:
85-
paths: "{{ __fluentbit_geoip_tmp['path'] }}"
85+
paths: "{{ __fluentbit_geoip_tmp.path }}"
8686
patterns: GeoLite2-City.mmdb
8787
recurse: true
8888
register: __fluentbit_geoip_found
8989

9090
- name: Ensure GeoLite2 City database was extracted
9191
ansible.builtin.fail:
9292
msg: GeoLite2-City.mmdb not found in downloaded archive
93-
when: __fluentbit_geoip_found['files'] | length == 0
93+
when: __fluentbit_geoip_found.files | length == 0
9494

9595
- name: Install GeoLite2 City database
9696
ansible.builtin.copy:
97-
src: "{{ __fluentbit_geoip_found['files'][0]['path'] }}"
97+
src: "{{ __fluentbit_geoip_found.files[0]['path'] }}"
9898
dest: /etc/fluent-bit/GeoLite2-City.mmdb
9999
owner: root
100100
group: root
@@ -104,11 +104,11 @@
104104
always:
105105
- name: Cleanup GeoIP temporary directory
106106
ansible.builtin.file:
107-
path: "{{ __fluentbit_geoip_tmp['path'] }}"
107+
path: "{{ __fluentbit_geoip_tmp.path }}"
108108
state: absent
109109
when:
110110
- __fluentbit_geoip_tmp is defined
111-
- 'path' in __fluentbit_geoip_tmp
111+
- "'path' in __fluentbit_geoip_tmp"
112112

113113
- name: Remove old-style configurations
114114
ansible.builtin.file:

0 commit comments

Comments
 (0)