diff --git a/bundles/systemd/items.py b/bundles/systemd/items.py index 0365bce..6e587dc 100644 --- a/bundles/systemd/items.py +++ b/bundles/systemd/items.py @@ -1,3 +1,5 @@ +timezone = node.metadata.get('timezone', 'UTC') + actions = { 'systemd-reload': { 'command': 'systemctl daemon-reload', @@ -16,8 +18,8 @@ actions = { }, }, 'systemd-timezone': { - 'command': 'timedatectl set-timezone UTC', - 'unless': 'timedatectl status | grep -Fi \'time zone\' | grep -i \'utc\'', + 'command': 'timedatectl set-timezone {}'.format(timezone), + 'unless': 'timedatectl status | grep -Fi \'time zone\' | grep -i \'{}\''.format(timezone.lower()), }, 'systemd-enable-ntp': { 'command': 'timedatectl set-ntp true',