diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-08-20 10:57:34 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-08-20 10:57:34 -0300 |
commit | fdbf15e77aed96b568e1dd42199aaab0b1fd178c (patch) | |
tree | 9f6b319608674c1cdab8f5a4cc2ed01d2f9b1858 /manifests/timezone.pp | |
parent | 556fc108155ec8e59cf3511d8552d16c8e43e88c (diff) | |
download | puppet-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.pp | 17 |
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"], + } +} |