summaryrefslogtreecommitdiff
path: root/manifests/timezone.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-08-20 10:57:34 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-08-20 10:57:34 -0300
commitfdbf15e77aed96b568e1dd42199aaab0b1fd178c (patch)
tree9f6b319608674c1cdab8f5a4cc2ed01d2f9b1858 /manifests/timezone.pp
parent556fc108155ec8e59cf3511d8552d16c8e43e88c (diff)
downloadpuppet-ntp-fdbf15e77aed96b568e1dd42199aaab0b1fd178c.tar.gz
puppet-ntp-fdbf15e77aed96b568e1dd42199aaab0b1fd178c.tar.bz2
Splitting and renaming classes for autoloading
Diffstat (limited to 'manifests/timezone.pp')
-rw-r--r--manifests/timezone.pp17
1 files changed, 17 insertions, 0 deletions
diff --git a/manifests/timezone.pp b/manifests/timezone.pp
new file mode 100644
index 0000000..a54676b
--- /dev/null
+++ b/manifests/timezone.pp
@@ -0,0 +1,17 @@
+class ntp::timezone(
+ $zone = hiera('ntp::zone', '')
+) {
+
+ case $zone {
+ '': { fail("you need to define ntp::zone for ntp module") }
+ }
+
+ # the needed packages
+ package { "tzdata": ensure => installed, }
+
+ # adjust localtime
+ file { "/etc/localtime":
+ ensure => "/usr/share/zoneinfo/${zone}",
+ require => Package["tzdata"],
+ }
+}