Puppet Class: geoip::config::ge311

Defined in:
manifests/config/ge311.pp

Overview

This class is creating a GeoIP.conf configuration file for geoipupdate versions >= 3.1.1.

Parameters:

  • accountid (String)

    AccountID of your MaxMind subscription

  • licensekey (String)

    The license key issued by MaxMind to be used

  • editionids (Array[String]) (defaults to: ['GeoLite2-ASN','GeoLite2-City','GeoLite2-Country'])

    Edition IDs (formerly known as ProductIDs) to download

  • database_directory (Optional[Stdlib::Absolutepath]) (defaults to: undef)

    Path where the database file to be stored

  • host (Optional[String]) (defaults to: undef)

    The update server to use

  • proxy (Optional[String]) (defaults to: undef)

    URL or IP:Port of the proxy to use when accessing the update server

  • proxy_user_password (Optional[String]) (defaults to: undef)

    Credentials as username:password for proxy authentication

  • preserve_file_times (Optional[Boolean]) (defaults to: undef)

    Whether to preserve modification times of files downloaded from the server

  • lock_file (Optional[String]) (defaults to: undef)

    The lock file to use



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'manifests/config/ge311.pp', line 13

class geoip::config::ge311 (
  String $accountid,
  String $licensekey,
  Array[String] $editionids = ['GeoLite2-ASN','GeoLite2-City','GeoLite2-Country'],
  Optional[Stdlib::Absolutepath] $database_directory = undef,
  Optional[String] $host = undef,
  Optional[String] $proxy = undef,
  Optional[String] $proxy_user_password = undef,
  Optional[Boolean] $preserve_file_times = undef,
  Optional[String] $lock_file = undef,
) {
  $cfg_ensure = $geoip::ensure ? {
    /present/ => 'file',
    default   => $geoip::ensure,
  }

  file { $geoip::config_path:
    ensure  => $cfg_ensure,
    content => epp('geoip/GeoIP.conf.ge311.epp'),
    mode    => '0640',
    group   => 0,
    owner   => 0,
  }
}