Module geoip
In: /modules/geoip/manifests/common.pp
/modules/geoip/manifests/file.pp
/modules/geoip/manifests/conf.pp

geoip

Install any of the GeoIP database files.

  • `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. This module is only a minor convenience, since using the "file" type over and over with hardcoded paths gets quite ugly.

Example :

    # 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 => Class['nginx'] }

Defines

file  

Classes and Modules

Class geoip::common
Class geoip::conf

Defines

file( $path => '/usr/share/GeoIP', $ensure => 'undef', $source_path )

Class: geoip::file

Install any of the GeoIP database files.

Parameters:

 $ensure:
   Whether the file should be 'present' or 'absent'. Defaults to 'present'.
 $path:
   Full path where to install the file to. Default: /usr/share/GeoIP
 $source_path:
   Puppet path prefix where to find the source file. Mandatory.

Sample Usage :

 Geoip::File { source_path => 'puppet:///modules/foo/GeoIP' }
 geoip::file { [ 'GeoIP.dat', 'GeoIPv6.dat' ]: }

[Validate]