Added chrony support to ntpd class (for Fedora 16).
This commit is contained in:
parent
55982ef104
commit
feb04e2118
2 changed files with 71 additions and 4 deletions
|
@ -11,13 +11,42 @@ class ntpd {
|
|||
$ntp_server = ["pool.ntp.org"]
|
||||
}
|
||||
|
||||
case $kernel {
|
||||
linux: {
|
||||
include ntpd::isc-ntpd
|
||||
case $operatingsystem {
|
||||
"fedora": {
|
||||
include ntpd::chrony
|
||||
}
|
||||
openbsd: {
|
||||
"openbsd": {
|
||||
include ntpd::openntpd
|
||||
}
|
||||
default: {
|
||||
include ntpd::isc-ntpd
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install and configure Chrony NTP client.
|
||||
#
|
||||
class ntpd::chrony {
|
||||
|
||||
package { "chrony":
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "/etc/chrony.conf":
|
||||
ensure => present,
|
||||
mode => 0644,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
content => template("ntpd/chrony.conf.erb"),
|
||||
require => Package["chrony"],
|
||||
notify => Service["chronyd"],
|
||||
}
|
||||
|
||||
service { "chronyd":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue