summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-30 21:46:18 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-30 21:46:18 -0200
commit1d8abffd9b8a2422959230824e0055be5ccdb706 (patch)
treea6f7cf96ae736825c4cf7dcb14e8cf5cc36b80f2
parenta9f1289d9711ceb38e4cd285054a9de6016772a6 (diff)
downloadpuppet-ntp-1d8abffd9b8a2422959230824e0055be5ccdb706.tar.gz
puppet-ntp-1d8abffd9b8a2422959230824e0055be5ccdb706.tar.bz2
Variable check
-rw-r--r--manifests/init.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index cd745d3..06de9b2 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -2,6 +2,10 @@
class timezone {
+ case $ntp_timezone {
+ '': { fail("you need to define \$ntp_timezone for ntp module") }
+ }
+
# the needed packages
package { "tzdata": ensure => installed, }
@@ -14,6 +18,11 @@ class timezone {
}
class ntp inherits timezone {
+
+ case $ntp_servers {
+ '': { fail("you need to define \$ntp_servers for ntp module") }
+ }
+
# the needed packages
package { "ntp": ensure => installed, }
@@ -50,6 +59,10 @@ class ntpdate inherits timezone {
# TODO: add logrotate rule to /var/log/ntpdate.log
+ case $ntp_pool {
+ '': { fail("you need to define \$ntp_pool for ntp module") }
+ }
+
# the needed packages
package { "ntpdate":
ensure => present,