Puppet Class: geoip::systemd::service
- Defined in:
- manifests/systemd/service.pp
Summary
Controling SystemD service unit for updateOverview
This class is creating a serivce unit for SystemD to update GeoIP databases. The service is running the geoipupdate ones and retry as configured.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'manifests/systemd/service.pp', line 8
class geoip::systemd::service (
String $restart = 'on-failure',
String $restart_sec = '5min',
) {
if $geoip::systemd_config == 'unit' {
systemd::unit_file { "${geoip::service_name}.service":
ensure => $geoip::ensure,
content => epp('geoip/service_unit.epp'),
}
} elsif $geoip::systemd_config == 'dropin' {
systemd::dropin_file { '10-exec.conf':
unit => "${geoip::service_name}.service",
content => epp('geoip/service_dropin_10.epp'),
}
systemd::dropin_file { '20-user-log.conf':
unit => "${geoip::service_name}.service",
content => epp('geoip/service_dropin_20.epp'),
}
if versioncmp($facts['systemd_version'], '240') >= 0 {
systemd::dropin_file { '30-restart.conf':
unit => "${geoip::service_name}.service",
content => epp('geoip/service_dropin_30.epp'),
}
}
}
}
|