From 5405fa546c638611704d57752452d41a4d6b435f Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Thu, 19 May 2022 12:40:32 -0400 Subject: [PATCH] Added: geoip copy to mirrorlist_proxy. Changed: geoip to not copy over broken sync script. Fixed: bad geolocation from 2018 --- roles/geoip/tasks/main.yml | 24 ++++++++++++++++--- .../mirrorlist_proxy/tasks/main.yml | 17 +++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/roles/geoip/tasks/main.yml b/roles/geoip/tasks/main.yml index f5da9a60ef..a6a30343c3 100644 --- a/roles/geoip/tasks/main.yml +++ b/roles/geoip/tasks/main.yml @@ -12,12 +12,30 @@ - packages when: (ansible_distribution == 'RedHat' and ansible_distribution_major_version|int >= 8) -- name: push over the geoip db once +- name: make sure the /usr/share/GeoIP/ directory exists + file: + path: /usr/share/GeoIP/ + state: directory + owner: root + group: root + mode: 0755 + tags: + - geoip + +- name: push over the older geoip db copy: src={{ item }} dest=/usr/share/GeoIP/ with_fileglob: - "{{ bigfiles }}/geoip/*.dat" tags: - geoip -- name: geoip syncing script via cron - copy: src=geoip_sync dest=/etc/cron.d/geoip_sync mode=0644 +- name: push over the newer geoip db + copy: src={{ item }} dest=/usr/share/GeoIP/ + with_fileglob: + - "{{ bigfiles }}/geoip/*.mmdb" + tags: + - geoip + +# comment out 2022-05-19. Script does not work since 2018. +#- name: geoip syncing script via cron +# copy: src=geoip_sync dest=/etc/cron.d/geoip_sync mode=0644 diff --git a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml index 7fae8a9337..8642357025 100644 --- a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml +++ b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml @@ -26,6 +26,23 @@ tags: - mirrorlist_proxy +- name: make sure the /usr/share/GeoIP/ directory exists + file: + path: /usr/share/GeoIP/ + state: directory + owner: root + group: root + mode: 0755 + tags: + - mirrorlist_proxy + +- name: push over the newer geoip db + copy: src={{ item }} dest=/usr/share/GeoIP/ + with_fileglob: + - "{{ bigfiles }}/geoip/*.mmdb" + tags: + - mirrorlist_proxy + - name: make sure mirrormanager user can write new protobuf based cache file file: dest="{{item}}" owner=mirrormanager group=mirrormanager with_items: