summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorstephen <stephen@puppetlabs.com>2012-10-16 12:48:29 +0100
committerstephen <stephen@puppetlabs.com>2012-11-06 11:23:53 +1100
commit7c9c93f2af8a970729bc9904faddbe2ef73d97b7 (patch)
treef8fa1ab8428cdfbf830ff629ab019d2da77c9672 /manifests
parente6e8d9e9c967ef0714dcf629f071b311da524c95 (diff)
have the module fail on unsupported os
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp11
1 files changed, 1 insertions, 10 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index b404071..0d19747 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -51,7 +51,6 @@ class ntp($servers='UNSET',
case $::operatingsystem {
debian, ubuntu: {
- $supported = true
$pkg_name = [ 'ntp' ]
$svc_name = 'ntp'
$config = '/etc/ntp.conf'
@@ -66,7 +65,6 @@ class ntp($servers='UNSET',
}
}
centos, redhat, oel, linux, fedora, Amazon: {
- $supported = true
$pkg_name = [ 'ntp' ]
$svc_name = 'ntpd'
$config = '/etc/ntp.conf'
@@ -80,7 +78,6 @@ class ntp($servers='UNSET',
}
}
freebsd: {
- $supported = true
$pkg_name = ['.*/net/ntp']
$svc_name = 'ntpd'
$config = '/etc/ntp.conf'
@@ -95,15 +92,10 @@ class ntp($servers='UNSET',
}
}
default: {
- $supported = false
- notify { "${module_name}_unsupported":
- message => "The ${module_name} module is not supported on ${::operatingsystem}",
- }
+ fail("The ${module_name} module is not supported on ${::operatingsystem}")
}
}
- if ($supported == true) {
-
package { 'ntp':
ensure => $package_ensure,
name => $pkg_name,
@@ -125,5 +117,4 @@ class ntp($servers='UNSET',
hasrestart => true,
subscribe => [ Package[$pkg_name], File[$config] ],
}
- }
}