aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ntp/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ntp/manifests/init.pp')
-rw-r--r--modules/ntp/manifests/init.pp17
1 files changed, 11 insertions, 6 deletions
diff --git a/modules/ntp/manifests/init.pp b/modules/ntp/manifests/init.pp
index b31d0567..f75310e7 100644
--- a/modules/ntp/manifests/init.pp
+++ b/modules/ntp/manifests/init.pp
@@ -1,12 +1,17 @@
class ntp {
- package { ntp: }
+if versioncmp($::lsbdistrelease, '9') < 0 {
+ $ntppkg = 'ntp'
+} else {
+ $ntppkg = 'ntpsec'
+}
+ package { $ntppkg: }
- service { ntpd:
- subscribe => [Package["ntp"], File["/etc/ntp.conf"]],
+ service { 'ntpd':
+ subscribe => [Package[$ntppkg], File['/etc/ntp.conf']],
}
- file { "/etc/ntp.conf":
- require => Package["ntp"],
- content => template("ntp/ntp.conf"),
+ file { '/etc/ntp.conf':
+ require => Package[$ntppkg],
+ content => template('ntp/ntp.conf'),
}
}