Puppet Class: geoip::config::lt311

Defined in:
manifests/config/lt311.pp

Overview

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

Parameters:

  • userid (String)

    UserID of your MaxMind subscription

  • licensekey (String)

    The license key issued by MaxMind to be used

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

    Product IDs to download

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

    Path where the database file to be stored

  • protocol (Optional[Enum['http','https']]) (defaults to: undef)

    Protocol to be used when accessing the update server

  • 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

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

    Whether to skip host name verification on HTTPS connections

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

    Whether to skip peer verification on HTTPS connections



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/lt311.pp', line 13

class geoip::config::lt311 (
  String $userid,
  String $licensekey,
  Array[String] $productids = ['GeoLite2-ASN','GeoLite2-City','GeoLite2-Country'],
  Optional[Stdlib::Absolutepath] $database_directory = undef,
  Optional[Enum['http','https']] $protocol = undef,
  Optional[String] $proxy = undef,
  Optional[String] $proxy_user_password = undef,
  Optional[Boolean] $skip_hostname_verification = undef,
  Optional[Boolean] $skip_peer_verification = undef,
) {
  $cfg_ensure = $geoip::ensure ? {
    /present/ => 'file',
    default   => $geoip::ensure,
  }

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