Skip to content

Instantly share code, notes, and snippets.

@hfm
Created December 10, 2017 12:59
Show Gist options
  • Save hfm/416d9884568df3448dc78edfab534464 to your computer and use it in GitHub Desktop.
Save hfm/416d9884568df3448dc78edfab534464 to your computer and use it in GitHub Desktop.
# Update the systemd temp files
#
# @api public
#
# @see timedatectl(1)
#
# @param operations
# The operations to perform on the systemd tempfiles
#
# * All operations may be combined but you'll probably only ever want to
# use ``create``
#
class systemd::timedatectl (
String $timezone = 'UTC',
) {
exec { 'timedatectl':
command => "timedatectl set-timezone ${timezone}",
unless => "realpath /etc/localhost | grep -qw '/usr/share/zoneinfo/${timezone}'",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment