Also make setting timezone work on debian 9 (stretch)
[mirror/dsa-puppet.git] / modules / debian_org / manifests / init.pp
index 151dd57..6e1c5da 100644 (file)
@@ -121,9 +121,16 @@ class debian_org {
                content => template('debian_org/debian_facts.yaml.erb')
        }
        file { '/etc/timezone':
-               source => 'puppet:///modules/debian_org/timezone',
+               content => "Etc/UTC\n",
                notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
        }
+       if versioncmp($::lsbmajdistrelease, '9') >= 0 { # jessie has a regular file there, for instance
+               file { '/etc/localtime':
+                       ensure => 'link',
+                       target => '/usr/share/zoneinfo/Etc/UTC',
+                       notify => Exec['dpkg-reconfigure tzdata -pcritical -fnoninteractive'],
+               }
+       }
        if $::hostname == handel {
                include puppetmaster::db
                $dbpassword = $puppetmaster::db::password