Puppet Class: ntp::service::redhat

Inherits:
ntp::params
Defined in:
manifests/service/redhat.pp

Overview

Class: ntp::service::redhat

RedHat-specific ntp service configuration. In particular this class ensures that ntpd creates a pidfile which we can monitor using monit.

Parameters:

  • ensure (Any)


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'manifests/service/redhat.pp', line 7

class ntp::service::redhat
(
    $ensure

) inherits ntp::params
{

    $ensure_file = $ensure ? {
        /(present|running)/ => 'present',
        'absent'            => 'absent',
    }

    if $::osfamily == 'RedHat' {
        file { 'ntp':
            ensure  => $ensure_file,
            name    => '/etc/sysconfig/ntpd',
            content => template('ntp/ntp.erb'),
            owner   => $::os::params::adminuser,
            group   => $::os::params::admingroup,
            mode    => '0644',
            notify  => Class['ntp::service'],
        }
    }
}