Skip to content

Commit 04d195c

Browse files
committed
adds fix for redhat to disable ntp restart due to dhcp ntp server updates
1 parent 94ccfd2 commit 04d195c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

spec/spec_helper_acceptance.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
on host, puppet('module install puppetlabs-stdlib'), {:acceptable_exit_codes => [0, 1]}
2626
end
2727

28+
#Need to disable update of ntp servers from DHCP, as subsequent restart of ntp causes test failures
2829
if fact('osfamily') == 'Debian'
2930
shell('[[ -f /etc/dhcp/dhclient-exit-hooks.d/ntp ]] && rm /etc/dhcp/dhcp-exit-hooks.d/ntp', { :acceptable_exit_codes => [0, 1] })
3031
shell('[[ -f /etc/dhcp3/dhclient-exit-hooks.d/ntp ]] && rm /etc/dhcp3/dhcp-exit-hooks.d/ntp', { :acceptable_exit_codes => [0, 1] })
32+
elsif fact('osfamily') == 'RedHat'
33+
shell('echo "PEERNTP=no" >> /etc/sysconfig/network', { :acceptable_exit_codes => [0, 1]})
3134
end
3235
end
3336
end

0 commit comments

Comments
 (0)