Revert "Add ntpdate to ensure hwclock sync"
This reverts commit 0a6199bded.
This doesn't actually work because if ntpd is started,
ntpdate cannot run. We would need another solution to
ensure the system clock is synced under ntp. The ntpdate
service is a oneshot service so it just runs a single
ntpdate (and hwclock) on boot.
Change-Id: Iaed98cbc3a15defbd07f54d7e3f49676011038d5
Related-Bug: #1856259
This commit is contained in:
@@ -110,16 +110,6 @@ outputs:
|
||||
name: ntpdate
|
||||
state: present
|
||||
when: ntp_install_packages|bool
|
||||
- name: Configure ntpdate to synchronize the hardware clock
|
||||
lineinfile:
|
||||
destfile: /etc/sysconfig/ntpdate
|
||||
regexp: '^SYNC_HWCLOCK=.*'
|
||||
line: 'SYNC_HWCLOCK=yes'
|
||||
- name: Ensure system is NTP time synced
|
||||
command: ntpdate -u {{ ntp_servers | join(" ") }}
|
||||
- name: Enable ntpdate service
|
||||
service:
|
||||
name: ntpdate
|
||||
state: started
|
||||
enabled: yes
|
||||
when: ntp_servers
|
||||
|
||||
@@ -116,12 +116,6 @@ outputs:
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: "'ntpd.service' in ansible_facts.services"
|
||||
- name: Disable ntpdate before configuring Chrony
|
||||
service:
|
||||
name: ntpdate
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: "'ntpdate.service' in ansible_facts.services"
|
||||
- name: Install, Configure and Run Chrony
|
||||
include_role:
|
||||
name: chrony
|
||||
|
||||
Reference in New Issue
Block a user