Skip to content
Snippets Groups Projects
Commit d49df5dc authored by ale's avatar ale
Browse files

Fix geoip-dataset templates

Properly support multiple datasets.
parent 4d827c04
Branches
No related tags found
No related merge requests found
- listen: trigger geoipupdate - listen: trigger geoipupdate
shell: "/usr/bin/geoipupdate -f /etc/GeoIP_{{ item }}.conf" shell: "/usr/bin/geoipupdate -f /etc/GeoIP.conf"
with_items: "{{ geoip_dataset }}" with_items: "{{ geoip_dataset }}"
...@@ -7,13 +7,12 @@ ...@@ -7,13 +7,12 @@
- name: Configure GeoIP downloader - name: Configure GeoIP downloader
template: template:
src: GeoIP.conf.j2 src: GeoIP.conf.j2
dest: "/etc/GeoIP_{{ item }}.conf" dest: "/etc/GeoIP.conf"
when: geoip_account_id is defined when: geoip_account_id is defined
with_items: "{{ geoip_dataset }}"
notify: trigger geoipupdate notify: trigger geoipupdate
- name: Setup geoipupdate cron job - name: Setup geoipupdate cron job
copy: copy:
dest: "/etc/cron.d/geoipupdate_{{ item }}" dest: "/etc/cron.d/geoipupdate"
content: "12 0 * * 5 root /usr/local/bin/splay 3600 && /usr/bin/geoipupdate -f /etc/GeoIP_{{ item }}.conf" content: "12 0 * * 5 root /usr/local/bin/splay 3600 && /usr/bin/geoipupdate -f /etc/GeoIP.conf"
with_items: "{{ geoip_dataset }}"
...@@ -7,4 +7,6 @@ LicenseKey {{ geoip_license_key | default('000000000000') }} ...@@ -7,4 +7,6 @@ LicenseKey {{ geoip_license_key | default('000000000000') }}
# * GeoLite2-City - GeoLite 2 City # * GeoLite2-City - GeoLite 2 City
# * GeoLite2-Country - GeoLite2 Country # * GeoLite2-Country - GeoLite2 Country
# For geoipupdate versions earlier than 2.5.0, use ProductIds here instead of EditionIDs. # For geoipupdate versions earlier than 2.5.0, use ProductIds here instead of EditionIDs.
EditionIDs GeoLite2-{{ geoip_dataset }} {% for geoip_database in geoip_dataset %}
EditionIDs GeoLite2-{{ geoip_database }}
{% endfor %}
  • ale @ale

    mentioned in commit c4264cde

    ·

    mentioned in commit c4264cde

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment