Commit 672fdbf3 authored by ale's avatar ale

Properly parameterize geoip config

parent 50260028
Pipeline #5737 passed with stages
in 9 minutes and 17 seconds
......@@ -14,19 +14,22 @@
copy:
src: GeoIP.conf
dest: /etc/GeoIP.conf
when: geoip_account_id is defined
- stat:
path: /var/lib/GeoIP/GeoLite2-Country.mmdb
register: geoip_country
when: geoip_account_id is defined
- name: Download GeoLite2-Country database
shell: geoipupdate
when: geoip_api_key is defined and not geoip_country.stat.exists
when: geoip_account_id is defined and not geoip_country.stat.exists
- name: Setup geoipupdate cron job
copy:
dest: /etc/cron.d/geoipupdate
content: "12 0 * * 5 root /usr/local/bin/splay 3600 && /usr/bin/geoipupdate"
when: geoip_account_id is defined
# Setup the SSO server.
- user:
......
# The following AccountID and LicenseKey are required placeholders.
# For geoipupdate versions earlier than 2.5.0, use UserId here instead of AccountID.
UserId 0
LicenseKey 000000000000
AccountId {{ geoip_account_id | default(0) }}
LicenseKey {{ geoip_license_key | default('000000000000') }}
# Include one or more of the following edition IDs:
# * GeoLite2-City - GeoLite 2 City
# * GeoLite2-Country - GeoLite2 Country
# For geoipupdate versions earlier than 2.5.0, use ProductIds here instead of EditionIDs.
ProductIds GeoLite2-Country
EditionIDs GeoLite2-Country
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment