summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorRyan Coleman <ryan@puppetlabs.com>2012-12-10 15:07:10 -0800
committerRyan Coleman <ryan@puppetlabs.com>2012-12-10 15:07:10 -0800
commit9cb459409f5335291d372468e2b600cfa55081f4 (patch)
treee0679d7ec338ae5b6caafbecca83ae2c9542cc9a /manifests
parent149575ce1a7e975933f190ab56697c1e46016158 (diff)
parent12ff9af2ca65af9954212a11536873ef21229991 (diff)
Merge pull request #29 from mmoll/osfamily
switch to the 'osfamily' fact
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp30
1 files changed, 24 insertions, 6 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 29358bd..9cf2f6e 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -60,8 +60,9 @@ class ntp($servers='UNSET',
fail('autoupdate parameter must be true or false')
}
- case $::operatingsystem {
- debian, ubuntu: {
+ case $::osfamily {
+ Debian: {
+ $supported = true
$pkg_name = [ 'ntp' ]
$svc_name = 'ntp'
$config = '/etc/ntp.conf'
@@ -75,7 +76,8 @@ class ntp($servers='UNSET',
$servers_real = $servers
}
}
- centos, redhat, oel, linux, fedora, Amazon: {
+ RedHat: {
+ $supported = true
$pkg_name = [ 'ntp' ]
$svc_name = 'ntpd'
$config = '/etc/ntp.conf'
@@ -88,7 +90,23 @@ class ntp($servers='UNSET',
$servers_real = $servers
}
}
- freebsd: {
+ SuSE: {
+ $supported = true
+ $pkg_name = [ 'ntp' ]
+ $svc_name = 'ntp'
+ $config = '/etc/ntp.conf'
+ $config_tpl = 'ntp.conf.suse.erb'
+ if ($servers == 'UNSET') {
+ $servers_real = [ '0.opensuse.pool.ntp.org',
+ '1.opensuse.pool.ntp.org',
+ '2.opensuse.pool.ntp.org',
+ '3.opensuse.pool.ntp.org', ]
+ } else {
+ $servers_real = $servers
+ }
+ }
+ FreeBSD: {
+ $supported = true
$pkg_name = ['.*/net/ntp']
$svc_name = 'ntpd'
$config = '/etc/ntp.conf'
@@ -103,13 +121,13 @@ class ntp($servers='UNSET',
}
}
default: {
- fail("The ${module_name} module is not supported on ${::operatingsystem}")
+ fail("The ${module_name} module is not supported on ${::osfamily} based systems")
}
}
package { 'ntp':
- name => $pkg_name,
ensure => $package_ensure,
+ name => $pkg_name,
}
file { $config: