I'm using PuPHPet for my testing environments, which is based on Vagrant/Puppet+Hiera.
In the config.yml (Hiera config file) I would like to add section for my timezone
and with command vagrant provision setup it properly.
It's that possible?
I'm using PuPHPet for my testing environments, which is based on Vagrant/Puppet+Hiera.
In the config.yml (Hiera config file) I would like to add section for my timezone
and with command vagrant provision setup it properly.
It's that possible?
You can install Time Zone plugin for Vagrant (
vagrant plugin install vagrant-timezone
) and configure Vagrantfile in the following way:Instead of
UTC
you can also use:host
to synchronize timezone with the host.Just add your timezone to whatever key you want in your hiera file, let's call it
timezone
. The value for which and the puppet code you'd need to set that timezone depends on the system you're firing up, but I'll assume RedHat flavor of unix.I recommend setting that to any valid value you'd see under
/usr/share/zoneinfo
. As an example your key may look like:timezone: 'US/Pacific'
Then you'd use the
file
puppet type to symlink/etc/localtime
to the full path of the timezone: