Commit e91a0cdd authored by Martin van Es's avatar Martin van Es
Browse files

Automatically download geoDNS database files

parent 78895277
inventory/group_vars/geodns.yml
.ssh/id_*
......@@ -25,3 +25,8 @@ During deploy, (Apache) virtualhost ServerNames will be generated by the followi
* proxy-[realm].[tld]
Make sure you have DNS entries for those hostnames in geoDNS configuration.
## geoDNS servers
To automatically download geoDNS GeoLite2DB's add a file ```geodns.yml``` to ```inventory/group_vars``` with the following content:
```geodns_licence: <your license key>```
......@@ -62,15 +62,20 @@
notify:
- "enable geodns job"
- name: Copy GeoLite2DB's
ansible.builtin.copy:
src: "{{ item }}"
- name: Download GeoLite2DB's
ansible.builtin.unarchive:
src: "https://download.maxmind.com/app/geoip_download?edition_id={{ item }}&license_key={{ geodns_licence }}&suffix=tar.gz"
dest: "{{ geolite_dir }}"
mode: '0644'
extra_opts: '--strip-components=1'
remote_src: yes
with_items:
- GeoLite2-Country.mmdb
- GeoLite2-ASN
- GeoLite2-City
- GeoLite2-Country
notify:
- "enable geodns job"
when: geodns_licence is defined
- name: Create geoDNS config
ansible.builtin.template:
......
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