time: Default to UTC if time zone is unset
This commit is contained in:
parent
a3fb12fe37
commit
af788fce2b
1 changed files with 12 additions and 2 deletions
|
@ -12,9 +12,18 @@ class time::server {
|
|||
|
||||
# Set default timezone
|
||||
#
|
||||
# $timezone_set should point to a file under /usr/share/zoneinfo/
|
||||
# for example $timezone_set = "Europe/Helsinki".
|
||||
# === Global variables
|
||||
#
|
||||
# $timezone_set:
|
||||
# Time zone as defined under /usr/share/zoneinfo/,
|
||||
# for example "Europe/Helsinki". Defaults to "UTC".
|
||||
#
|
||||
class time::zone {
|
||||
|
||||
if ! $timezone_set {
|
||||
$timezone_set = "UTC"
|
||||
}
|
||||
|
||||
file { "/etc/localtime":
|
||||
ensure => link,
|
||||
target => "/usr/share/zoneinfo/${timezone_set}",
|
||||
|
@ -45,4 +54,5 @@ class time::zone {
|
|||
fail("time::zone not supported on ${::operatingsystem}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue