In the past, I was using this command in my Ansible playbooks:
ntpdate pool.ntp.org
And it worked. But now, on Centos 8 ntpdate
is no longer supported and chrony
is used. However, the equivalent command
chronyd -q 'server pool.ntp.org iburst'
raises an error:
fatal: [localhost]: FAILED! => changed=true cmd: chronyd -q 'server pool.ntp.org iburst' delta: '0:00:00.005235' end: '2020-05-14 04:36:33.763055' msg: non-zero return code rc: 1 start: '2020-05-14 04:36:33.757820' stderr: |- 2020-05-14T08:36:33Z chronyd version 3.5 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG) 2020-05-14T08:36:33Z Fatal error : Another chronyd may already be running (pid=1338), check /var/run/chrony/chronyd.pid stderr_lines: <omitted> stdout: '' stdout_lines: <omitted>
How can I fix it?