bundles/systemd: support different timezones
This commit is contained in:
parent
dba7beae1c
commit
fbf0371371
1 changed files with 4 additions and 2 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue