|
||
---|---|---|
defaults | ||
handlers | ||
meta | ||
molecule | ||
tasks | ||
templates | ||
tests | ||
vars | ||
.ansible-lint | ||
.gitignore | ||
.travis.yml | ||
.yamllint | ||
LICENSE | ||
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).