I am using Ubuntu 10.04 and use puppet to change the timezone from UTC to PST when the server comes up. Puppet's timezone recipe which I am using is this: Puppet Time Recipe
Things were working fine with Ubuntu 10.04, now we are moving to Ubuntu 12.04 and this Puppet recipe doesn't work. Reason I figured out is in 10.04 /etc/localtime is a file with contents PST8PDT whereas in 12.04 it is a symlink(because of puppet recipe) and it is linked to SystemV/ but the path of SystemV directory is not correct. When I do a ls -l in /etc
lrwxrwxrwx 1 root root 18 Oct 18 18:38 localtime -> ../SystemV/PST8PDT
But there is no SystemV folder one level up of /etc. I changed the puppet recipe to this:
class timezone::pacific inherits timezone {
file { "/etc/localtime":
require => Package["tzdata"],
# source => "file:///usr/share/zoneinfo/US/Pacific",
source => "file:///usr/share/zoneinfo/SystemV/PST8PDT",
and it worked and localtime was no longer a link. Can anyone please help me understand why the puppet recipe which I inherited and was working fine on 10.04 didnt work on 12.04 and why changing the recipe to the new SystemV destination fixed it .
It is a bit odd. On my 12.04 VM both
/usr/share/zoneinfo/SystemV/PST8PDT
and/usr/share/zoneinfo/US/Pacific
are a symlink to/usr/share/zoneinfo/America/Los_Angeles
. Either path you used should have resulted in a/etc/localtime
which was a link to../America/Los_Angeles
.Have you considered doing a
links => follow
? That way puppet would resolve the symlink and copy the contents instead of copying the symlink.