You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Laur Ivan 3fb4787bf3 Initial addition. 2 years ago
defaults Initial addition. 2 years ago
handlers Initial addition. 2 years ago
meta Initial addition. 2 years ago
molecule Initial addition. 2 years ago
tasks Initial addition. 2 years ago
templates Initial addition. 2 years ago
tests Initial addition. 2 years ago
vars Initial addition. 2 years ago
.ansible-lint Initial addition. 2 years ago
.gitignore Initial addition. 2 years ago
.travis.yml Initial addition. 2 years ago
.yamllint Initial addition. 2 years ago
LICENSE Initial addition. 2 years ago
README.md Initial addition. 2 years ago

README.md

laurivan.geoip

This role installs MaxMind GeoIP DB downloader on your system

Requirements

N/A

Role Variables

This role uses the variables listed below, along with default values (see defaults/main.yml).

You need GeoIP credentials in order to use this image. Get them for free at MaxMind. Once you have them, please set:

geoip_account_id:
geoip_license_key: 

If you don't have the credentials set, the role will skip most tasks.

Second step is to decide the frequency of update and the type of data you want (country- or city-level). Once you have decided, please set:

geoip_update_edition_ids: "GeoLite2-City"
geoip_update_frequency: "168"

As you can see, there are already defaults: get the city-level data every 7 days (because, let's be honest, geoip data doesn't change massively that often).

Now that all server-side parameters are set, we need a location where the data is downloaded. This is sete via geoip_volume which defaults to /var/local/geoip/.

Note: It is important to remember this location and set its rights properly because you'll need it for other software which uses GeoIP.

Dependencies

None

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
  vars:
    geoip_account_id: "123456"
    geoip_license_key: "FakeLicenseKey"
    geoip_update_edition_ids: "GeoLite2-City GeoLite2-Country"
    geoip_update_frequency: "72"
  roles:
     - { role: username.rolename, x: 42 }

License

MIT

Author Information

An optional section for the role authors to include contact information, or a website (HTML is not allowed).