I just tried the command twice in a row, and got different results:
(kayobe) ubuntu@kayobevm:~$ ssh OMC3-RG4-03-SRV-05 "sudo systemctl is-active chrony chronyd ntp ntpd sytemd-timesyncd; echo $?" active active inactive inactive inactive 3 (kayobe) ubuntu@kayobevm:~$ ssh OMC3-RG4-03-SRV-05 "sudo systemctl is-active chrony chronyd ntp ntpd sytemd-timesyncd; echo $?" active active inactive inactive inactive 0
Perhaps the check should be something more definitive?
I just tried the command twice in a row, and got different results:
(kayobe) ubuntu@kayobevm:~$ ssh OMC3-RG4-03-SRV-05 "sudo systemctl is-active chrony chronyd ntp ntpd sytemd-timesyncd; echo $?"
active
active
inactive
inactive
inactive
3
(kayobe) ubuntu@kayobevm:~$ ssh OMC3-RG4-03-SRV-05 "sudo systemctl is-active chrony chronyd ntp ntpd sytemd-timesyncd; echo $?"
active
active
inactive
inactive
inactive
0
Perhaps the check should be something more definitive?