Chef cookbook to download GeoLite2 Free databases from MaxMind.
MaxMind account license key is required in order to download GeoLite2 Free databases. Read more here.
Download the latest GeoLite2 Country database
geolite2_country_database 'default' do
license_key 'ABCD...' # MaxMind account license key
end
Download the latest GeoLite2 City database
geolite2_city_database 'default' do
license_key 'ABCD...' # MaxMind account license key
end
# Get a full path to a GeoLite2 Country database
::ChefCookbook::GeoLite2.country_database(node, 'default') # /etc/chef-geolite2/country_default/GeoLite2-Country.mmdb
# Get a full path to a GeoLite2 City database
::ChefCookbook::GeoLite2.city_database(node, 'default') # /etc/chef-geolite2/city_default/GeoLite2-City.mmdb
MIT @ Alexander Pyatkin