From 6ba0f6df1d6706d77e63d589a1662506c58bdeff Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Fri, 13 Nov 2020 23:26:13 +0100 Subject: [PATCH] bundles/systemd: make sure we're using UTC and NTP --- bundles/systemd/items.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bundles/systemd/items.py b/bundles/systemd/items.py index d640808..ac4493e 100644 --- a/bundles/systemd/items.py +++ b/bundles/systemd/items.py @@ -15,4 +15,12 @@ actions = { 'file:/etc/hosts', }, }, + 'systemd-timezone': { + 'command': 'timedatectl set-timezone UTC', + 'unless': 'timedatectl status | grep -Fi \'time zone\' | grep -i \'utc\'', + }, + 'systemd-enable-ntp': { + 'command': 'timedatectl set-ntp true', + 'unless': 'timedatectl status | grep -Fi \'ntp service\' | grep -i \'active\'', + }, }