Skip to content

Commit

Permalink
MODULES-6363: fix disable dhclient (#439)
Browse files Browse the repository at this point in the history
* update ntp::disable_dhclient to remove dhclient ntp script which causes flop

* add spec test

* adjust style

* created new spec helper as I updated the wrong one.  disable_dhclient did not exist

* fix syntax issue

* adjust testing for Travis CI

* adjust testing pass Travis CI

* remove extra end

* fighting the ends

* please appease the travis ci gods

* please appease the travis ci gods

* remove backup creation

* rubocop pass!

* disable_monitoring_spec.rb is a bad example to try to follow

* .

* trying again

* if at first you dont succeed, bash on the keyboard some more

* if at first you dont succeed, bash on the keyboard some more

* if at first you dont succeed, bash on the keyboard some more

* doh!

* if disable_dhclient => false do nothing

* remove unnecessary spacing

* fix absent file test

* udpate

* fix syntax

* fix syntax

* put test in right location and delete all the crazy stuff i was doing for no reason
  • Loading branch information
sudodevnull authored and pmcmaw committed Feb 9, 2018
1 parent 45c1c0f commit 4f17064
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,10 @@
file { '/var/lib/ntp/ntp.conf.dhcp':
ensure => absent,
}

#remove dhclient ntp script which modifies ntp.conf on RHEL and Amazon Linux
file { '/etc/dhcp/dhclient.d/ntp.sh':
ensure => absent,
}
}
}
3 changes: 3 additions & 0 deletions spec/classes/ntp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@
it 'contains dhcp file' do
is_expected.to contain_file('/var/lib/ntp/ntp.conf.dhcp').with_ensure('absent')
end
it 'contains ntp.sh file' do
is_expected.to contain_file('/etc/dhcp/dhclient.d/ntp.sh').with_ensure('absent')
end
end
context 'when set to false' do
let(:params) do
Expand Down

0 comments on commit 4f17064

Please sign in to comment.