bundles/systemd: ensure we have systemd-timesyncd installed and running

This commit is contained in:
Franzi 2022-03-13 14:06:40 +01:00
parent 28b235514a
commit a9d4cc73c1
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 15 additions and 0 deletions

View file

@ -24,6 +24,9 @@ actions = {
'systemd-enable-ntp': { 'systemd-enable-ntp': {
'command': 'timedatectl set-ntp true', 'command': 'timedatectl set-ntp true',
'unless': 'timedatectl status | grep -Fi \'ntp service\' | grep -i \'active\'', 'unless': 'timedatectl status | grep -Fi \'ntp service\' | grep -i \'active\'',
'needs': {
'svc_systemd:systemd-timesyncd',
},
}, },
} }
@ -45,4 +48,5 @@ svc_systemd = {
'file:/etc/systemd/journald.conf', 'file:/etc/systemd/journald.conf',
}, },
}, },
'systemd-timesyncd': {},
} }

View file

@ -0,0 +1,11 @@
defaults = {
'apt': {
'packages': {
'systemd-timesyncd': {
'needed_by': {
'svc_systemd:systemd-timesyncd',
},
},
},
},
}