geoip

GeoIP module

32,665 downloads

240 latest version

3.1 quality score

Version information

  • 0.1.3 (latest)
  • 0.1.2
  • 0.1.1
  • 0.0.1
released Feb 5th 2025
This version is compatible with:
  • Puppet Enterprise 2025.3.x, 2025.2.x, 2025.1.x, 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=2.7.20 <9.0.0
  • RedHat
    ,
    CentOS

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'thias-geoip', '0.1.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add thias-geoip
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install thias-geoip --version 0.1.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: maxmind, geoip, mmdb

Documentation

thias/geoip — version 0.1.3 Feb 5th 2025

puppet-geoip

Overview

Install any of the GeoIP database files.

  • geoip::conf : Class to manage GeoIP.conf with your MaxMind account info.
  • geoip::file : Definition to install any GeoIP database file.

There is no magic here, you need to have the Geo*.dat files available on your puppetmaster somewhere, and reference them.

You can use geoip::conf on your puppetmaster and create a cron job which will update databases regularly.

Examples

Set defaults in site.pp :

Geoip::File {
  path        => '/usr/local/share',
  source_path => 'puppet:///modules/mymodule/GeoIP',
}

For a node where nginx will have its geoip module enabled :

geoip::file { 'GeoIP.dat':
  before => Service['nginx'],
}

For a node which will be downloading updated files from MaxMind directly using the geoipupdate script :

class { 'geoip::conf':
  userid     => '12345',
  licensekey => 'abcdefg12345',
  productids => 'GeoIP2-Country 106',
  group      => 'wheel',
  mode       => '0640',
}