geoip: The geoip module installs tools and databases GeoIP resolution from MaxMind. You may replace userid and licensekey with your subscription angeoip::config: This class implements the configuration stage of this module. It should not be called directly. Configuration file defined with `geoip::confgeoip::config::ge311: This class is creating a GeoIP.conf configuration file for geoipupdate versions >= 3.1.1.geoip::config::lt311: This class is creating a GeoIP.conf configuration file for geoipupdate versions < 3.1.1.geoip::install: This class implements the installation stage of the module. It should not be called directly. This will install or remove software packagesgeoip::service: This class implements the service control stage of the module. It should not be called directly. Ifgeoip::manage_serviceenabled, an updageoip::systemd::service: Controling SystemD service unit for updategeoip::systemd::timer: Controll the SystemD Timer unit
The geoip module installs tools and databases GeoIP resolution from MaxMind.
You may replace userid and licensekey with your subscription and add the productids you want to sync. Leaving these options on default will allow you to sync all free available databases. With database_directory the destination directory of the databases can be set, protocol, proxy* and *_verification may only be needed in the case your host needs some specific proxy settings to get to the internet.
geoip::config:
userid: '999999'
licensekey: '000000000000'
productids:
- GeoLite2-City
- GeoLite2-Country
database_directory:
protocol:
proxy:
proxy_user_password:
skip_hostname_verification:
skip_peer_verification:The following parameters are available in the geoip class:
ensurepackagespackage_ensureconfig_pathconfig_versionconfigmanage_servicesystemd_configservice_userservice_groupupdate_pathservice_nameupdate_timersupdate_scatter
Data type: Enum['present', 'absent']
install or remove settings done by this module
Default value: 'present'
Data type: Array[String]
the software packages containing the tools to be installed
Default value: ['mmdb-bin', 'geoipupdate']
Data type: String
which version of the packages should be ensured
Default value: 'latest'
Data type: Stdlib::Absolutepath
path to the configuration and license file
Default value: '/etc/GeoIP.conf'
Data type: Enum['lt311','ge311']
the config version to use for geoipupdate
Default value: 'lt311'
Data type: Hash
hash of configuration options
Default value: {}
Data type: Boolean
whether to manage database updating service
Default value: true
Data type: Enum['unit', 'dropin']
type of configuration how changes are applied to systemd
Default value: 'unit'
Data type: String
effective user the update service should run
Default value: 'root'
Data type: String
effective group the update service should run
Default value: 'root'
Data type: Stdlib::Absolutepath
path to the geoipupdate tool, used by update service
Default value: '/usr/bin/geoipupdate'
Data type: String
name of the update service
Default value: 'geoip_update'
Data type: Array[String]
wallclock timers when the update service should be triggered (for syntax see systemd.time(7)#Parsing Timestamps)
Default value: []
Data type: Integer
a time window in seconds of randomized, host specific delay of the update trigger (see systemd.timer(5)#AccuracySec)
Default value: 1800
This class implements the configuration stage of this module. It should not be called directly.
Configuration file defined with geoip::config_path will be created using parameter from
geoip::config.
This class is creating a GeoIP.conf configuration file for geoipupdate versions >= 3.1.1.
The following parameters are available in the geoip::config::ge311 class:
accountidlicensekeyeditionidsdatabase_directoryhostproxyproxy_user_passwordpreserve_file_timeslock_file
Data type: String
AccountID of your MaxMind subscription
Data type: String
The license key issued by MaxMind to be used
Data type: Array[String]
Edition IDs (formerly known as ProductIDs) to download
Default value: ['GeoLite2-ASN','GeoLite2-City','GeoLite2-Country']
Data type: Optional[Stdlib::Absolutepath]
Path where the database file to be stored
Default value: undef
Data type: Optional[String]
The update server to use
Default value: undef
Data type: Optional[String]
URL or IP:Port of the proxy to use when accessing the update server
Default value: undef
Data type: Optional[String]
Credentials as username:password for proxy authentication
Default value: undef
Data type: Optional[Boolean]
Whether to preserve modification times of files downloaded from the server
Default value: undef
Data type: Optional[String]
The lock file to use
Default value: undef
This class is creating a GeoIP.conf configuration file for geoipupdate versions < 3.1.1.
The following parameters are available in the geoip::config::lt311 class:
useridlicensekeyproductidsdatabase_directoryprotocolproxyproxy_user_passwordskip_hostname_verificationskip_peer_verification
Data type: String
UserID of your MaxMind subscription
Data type: String
The license key issued by MaxMind to be used
Data type: Array[String]
Product IDs to download
Default value: ['GeoLite2-ASN','GeoLite2-City','GeoLite2-Country']
Data type: Optional[Stdlib::Absolutepath]
Path where the database file to be stored
Default value: undef
Data type: Optional[Enum['http','https']]
Protocol to be used when accessing the update server
Default value: undef
Data type: Optional[String]
URL or IP:Port of the proxy to use when accessing the update server
Default value: undef
Data type: Optional[String]
Credentials as username:password for proxy authentication
Default value: undef
Data type: Optional[Boolean]
Whether to skip host name verification on HTTPS connections
Default value: undef
Data type: Optional[Boolean]
Whether to skip peer verification on HTTPS connections
Default value: undef
This class implements the installation stage of the module. It should not be called directly.
This will install or remove software packages listed in geoip::packages. When installing
package versions will be ensured as geoip::package_ensure.
This class implements the service control stage of the module. It should not be called directly.
If geoip::manage_service enabled, an update service will be created fitting to the service
provider available on the node. Service name is configured with geoip::service_name.
This class is creating a serivce unit for SystemD to update GeoIP databases. The service is running the geoipupdate ones and retry as configured.
The following parameters are available in the geoip::systemd::service class:
Data type: String
update service retry behaviour
Default value: 'on-failure'
Data type: String
time to wait before retry
Default value: '5min'
This class will create a SystemD timer unit triggering the update service on each wallclock timer.
The following parameters are available in the geoip::systemd::timer class:
Data type: Boolean
if systemd_config is set to dropin, the existing timer may already have wallclocks, this aboud to overwrite or append them
Default value: true