---
  - name: Download MaxMind GeoIP Database
    get_url:
      url: http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
      dest: "{{ app_base }}/geoip/maxmind.tar.gz"

  - name: Extract MaxMind GeoIP Database
    unarchive:
      src: "{{ app_base }}/geoip/maxmind.tar.gz"
      dest: "{{ app_base }}/geoip"
      remote_src: yes
      creates: "{{ app_base }}/geoip/GeoLite2-City.mmdb"
      mode: "u=rwx,g=rx,o=rx"
      owner: "azuracast"
      group: "www-data"
      extra_opts: "--strip-components=1"
