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 = {
|
actions = {
|
||||||
'systemd-reload': {
|
'systemd-reload': {
|
||||||
'command': 'systemctl daemon-reload',
|
'command': 'systemctl daemon-reload',
|
||||||
|
@ -16,8 +18,8 @@ actions = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'systemd-timezone': {
|
'systemd-timezone': {
|
||||||
'command': 'timedatectl set-timezone UTC',
|
'command': 'timedatectl set-timezone {}'.format(timezone),
|
||||||
'unless': 'timedatectl status | grep -Fi \'time zone\' | grep -i \'utc\'',
|
'unless': 'timedatectl status | grep -Fi \'time zone\' | grep -i \'{}\''.format(timezone.lower()),
|
||||||
},
|
},
|
||||||
'systemd-enable-ntp': {
|
'systemd-enable-ntp': {
|
||||||
'command': 'timedatectl set-ntp true',
|
'command': 'timedatectl set-ntp true',
|
||||||
|
|
Loading…
Reference in a new issue