From 9f402923e4f7336a862522e583987661cab0417a Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Tue, 4 May 2021 15:03:34 +0200 Subject: [PATCH] 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 --- .../modules/packstack/manifests/chrony.pp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/packstack/puppet/modules/packstack/manifests/chrony.pp b/packstack/puppet/modules/packstack/manifests/chrony.pp index 84dbcd845..89aeffd49 100644 --- a/packstack/puppet/modules/packstack/manifests/chrony.pp +++ b/packstack/puppet/modules/packstack/manifests/chrony.pp @@ -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'] }