diff --git a/manifests/fetchcrl.pp b/manifests/fetchcrl.pp index 1c9b60fc41a63179e4b6647e46bd6e7ae798b1ff..f0f9947152eebc60ba83e9406ef4eeae6c36bc7f 100644 --- a/manifests/fetchcrl.pp +++ b/manifests/fetchcrl.pp @@ -20,7 +20,7 @@ class x509certs::fetchcrl notify => Exec['x509certs::fetchcrl::initial']; } } - /^(CentOS|RedHat|Scientific):(7)(\.[^:]+)?$/: { + /^(CentOS|RedHat|Scientific):([7-8])(\.[^:]+)?$/: { package { 'perl-LWP-Protocol-https': ensure => installed, before => Package['fetch-crl'], @@ -40,14 +40,32 @@ class x509certs::fetchcrl # Obsolete; now just an empty package depending on fetch-crl. ensure => absent; } - service { - 'fetch-crl-cron': - enable => true, ensure => running, - require => Package['fetch-crl']; - 'fetch-crl-boot': - enable => false, - require => Package['fetch-crl']; + + # Activate services as required per operatingsystem + case "${::operatingsystem}:${::operatingsystemrelease}" + { + /^(CentOS|RedHat|Scientific):([6-7])(\.[^:]+)?$/: { + service { + 'fetch-crl-cron': + enable => true, ensure => running, + require => Package['fetch-crl']; + 'fetch-crl-boot': + enable => false, + require => Package['fetch-crl']; + } + } + /^(CentOS|RedHat|Scientific):(8)(\.[^:]+)?$/: { + service { + 'fetch-crl.timer': + enable => true, ensure => running, + require => Package['fetch-crl']; + } + } + default: { + fail("X509certs::Fetchcrl: Unsupported operating system") + } } + exec { 'x509certs::fetchcrl::initial': command => '/usr/sbin/fetch-crl -p 16',