Report abuse

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"]