Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # NTP class definition
- class ntp {
- include "ntp::$operatingsystem"
- }
- class ntp::common {
- file { "ntp.conf":
- path => "/etc/ntp.conf",
- owner => "root",
- group => "root",
- mode => 644,
- source => "puppet://puppetmaster/files/ntp.conf",
- require => Package["ntp"],
- }
- package { "ntp":
- ensure => installed,
- }
- service { "ntp":
- subscribe => File["ntp.conf"],
- require => File["ntp.conf"],
- ensure => running,
- }
- }
- class ntp::openbsd inherits ntp::common {
- File["ntp.conf"] {
- path => "/etc/ntpd.conf",
- group => "wheel",
- source => "puppet://puppetmaster/files/ntpd.conf.$operatingsystem",
- }
- Package["ntp"] {
- source => "http://openbsd.mirrorcatalogs.com/pub/OpenBSD/5.1/packages/i386/",
- }
- Service["ntp"] {
- provider => "base",
- hasstatus => "false",
- start => "/usr/sbin/ntpd",
- }
- }
- class ntp::ubuntu inherits ntp::common {
- Service["ntp"] {
- provider => "init",
- path => "/etc/init.d/",
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment