Remove ntpdate references

CentOS/RHEL 8 no longer include the ntpdate package and command, so
we need to remove them if we want to manually specify NTP servers.
The ntpdate action is replaced by an equivalent one running
"chronyc makestep".

Change-Id: Ib53089d1b80c1f9d4cddc6bea593575fe73619a5
Closes-Bug: #1927074
This commit is contained in:
Javier Pena 2021-05-04 15:03:34 +02:00 committed by Javier Peña
parent 33517d4b22
commit 9f402923e4

View File

@ -54,11 +54,6 @@ class packstack::chrony ()
name => 'chrony',
}
package { 'ntpdate':
ensure => 'installed',
name => 'ntpdate',
}
file { 'chrony_conf':
ensure => file,
path => '/etc/chrony.conf',
@ -72,14 +67,8 @@ class packstack::chrony ()
onlyif => 'systemctl status chronyd.service'
}
# for cases where ntpd is running instead of default chronyd
service { 'ntpd':
ensure => stopped,
enable => false,
}
exec { 'ntpdate':
command => "/usr/sbin/ntpdate ${cfg_ntp_servers}",
command => "/usr/bin/chronyc makestep",
tries => 3,
}
@ -92,10 +81,8 @@ class packstack::chrony ()
}
Package['chrony']
-> Package['ntpdate']
-> File['chrony_conf']
-> Exec['stop-chronyd']
-> Service['ntpd']
-> Exec['ntpdate']
-> Service['chronyd']
-> Exec['ntpdate']
}