482e1110f0
There are long-standing issues with ntp start ordering w.r.t unbound and being able to resolve DNS names. Things have moved on to systemd-timesyncd anyway. Move the ntp start from the generic locations to only apply to older distros, and use system-timesyncd on Bionic. Update testing. Change-Id: I664539f93242e2c68d0cb1cf95c260f3bc03550d
33 lines
941 B
YAML
33 lines
941 B
YAML
# NOTE(pabelanger): We need to ensure ntpdate service starts on boot for
|
|
# centos-7. Currently, ntpd explicitly require ntpdate to be running before
|
|
# the sync process can happen in ntpd. As a result, if ntpdate is not
|
|
# running, ntpd will start but fail to sync because of DNS is not properly
|
|
# setup.
|
|
#
|
|
# NOTE(ianw): NTP ordering is further broken on other distros too.
|
|
# The more supported path is probably chrony on RHEL-ish distros. On
|
|
# others, systemd-timesyncd. Leaving this alone, but centos8 era
|
|
# should reconsider.
|
|
- name: Ensure NTP service is running
|
|
service:
|
|
name: ntpd
|
|
enabled: yes
|
|
state: started
|
|
|
|
- name: Ensure ntpdate service is running
|
|
service:
|
|
name: ntpdate
|
|
enabled: yes
|
|
|
|
- name: Configure yum cron
|
|
copy:
|
|
mode: 0644
|
|
src: yum/yum-cron.conf
|
|
dest: /etc/yum/yum-cron.conf
|
|
|
|
- name: Ensure yum cron service is running
|
|
service:
|
|
name: yum-cron
|
|
enabled: yes
|
|
state: started
|