Just add the time zone to any key you want in your hiera file, call it timezone . The value for which you need to set this time zone and the puppet code depends on the system you are shooting at, but I will use the Unix RedHat code.
I recommend setting this value to any valid value that you see in the /usr/share/zoneinfo . As an example, your key might look like this:
timezone: 'US/Pacific'
Then you should use the puppet type file for the symbolic link /etc/localtime for the full /etc/localtime path:
$tz = hiera('timezone') file {'/etc/localtime': ensure => link, target => "/usr/share/zoneinfo/${tz}"}
Kyle campos
source share