-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(MODULES-6363) fix disabling dhclient on redhat-derivatives #439
Merged
pmcmaw
merged 27 commits into
puppetlabs:master
from
sudodevnull:Fix-ntp.conf-flop-on-RHEL-and-Amazon-linux
Feb 9, 2018
Merged
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
da1378f
update ntp::disable_dhclient to remove dhclient ntp script which caus…
56870f3
add spec test
af9599c
adjust style
52f25a4
created new spec helper as I updated the wrong one. disable_dhclient…
b605ff8
fix syntax issue
6864b17
adjust testing for Travis CI
4e5775f
adjust testing pass Travis CI
67dd21e
remove extra end
849cdce
fighting the ends
2116776
please appease the travis ci gods
7e3ab69
please appease the travis ci gods
3b3508c
remove backup creation
1b767e6
rubocop pass!
69687be
disable_monitoring_spec.rb is a bad example to try to follow
cc64adb
.
02e7162
trying again
ca77b2f
if at first you dont succeed, bash on the keyboard some more
18678d7
if at first you dont succeed, bash on the keyboard some more
623daa7
if at first you dont succeed, bash on the keyboard some more
a94dab6
doh!
ef78611
if disable_dhclient => false do nothing
e08f189
remove unnecessary spacing
6e1dc5b
fix absent file test
6ff06ee
udpate
53999ae
fix syntax
854ad9c
fix syntax
a6ae864
put test in right location and delete all the crazy stuff i was doing…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'ntp class with disable_dhclient:', unless: UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do | ||
context 'with should disable' do | ||
let(:pp) { "class { 'ntp': disable_dhclient => true }" } | ||
|
||
it 'runs twice' do | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe file('/files/etc/dhcp/dhclient.conf') do | ||
its(:content) { is_expected.not_to match('ntp-servers') } | ||
end | ||
|
||
it { | ||
should contain_file('/etc/dhcp/dhclient.d/ntp.sh').with( | ||
'ensure' => 'absent', | ||
'backup' => 'true', | ||
) | ||
should contain_file('/var/lib/ntp/ntp.conf.dhcp').with( | ||
'ensure' => 'absent', | ||
) | ||
} | ||
end | ||
|
||
context 'when enabled' do | ||
let(:pp) { "class { 'ntp': disable_dhclient => false }" } | ||
|
||
it 'runs twice' do | ||
apply_manifest(pp, catch_failures: true) | ||
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
describe file('/files/etc/dhcp/dhclient.conf') do | ||
its(:content) { is_expected.to match('ntp-servers') } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would unexpectedly override global file bucket policy, I think this should be left up to user of the module, or make it configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean for creating a backup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. Also, please ignore my many commits... first time writing testing, and fighting the travis ci.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintainer will ask you to squash them into one, when it's finalized