aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ntp/manifests/init.pp
blob: 9a962211e3de7f64c4d85ef3f29a5d6e13e982ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class ntp {
if versioncmp($::lsbdistrelease, '9') < 0 {
    $ntppkg = 'ntp'
} else {
    $ntppkg = 'ntpsec'
}
    package { $ntppkg: }

    service { 'ntpd':
        subscribe => [Package[$ntppkg], File['/etc/ntp.conf']],
    }

    file { '/etc/ntp.conf':
        require => Package['ntp'],
        content => template('ntp/ntp.conf'),
    }
}