Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class ntp {
        @service { ntpd:
                name => $operatingsystem ? {
                        default => "ntpd",
                        },
                ensure => running,
                enable => true,
                hasrestart => true,
                hasstatus => true,
                require => Package[ntp],
                subscribe => File["ntp.conf"],
        }
...

class ntp::ntpdate inherits ntp {

        package { ntp:
                name => $operatingsystem ? {
                        default => "ntp",
                        },
                ensure => present,
        }

        Service["ntpd"] {
                ensure => stopped
        }
        Realize Service["ntpd"]