-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Added option dns search domain #96
Conversation
@yuav - Thanks! |
Fixed |
@@ -15,6 +15,9 @@ log-facility <%= @logfacility %>; | |||
# ---------- | |||
option domain-name "<%= @dnsdomain_real.first %>"; | |||
option domain-name-servers <%= @nameservers.join(', ') %>; | |||
<% if @dnssearchdomains -%> |
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.
an empty array is also true...
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.
Oh right, future parser. Nice catch!
I'll add another test :-)
Should be less bad now |
@@ -15,6 +15,9 @@ log-facility <%= @logfacility %>; | |||
# ---------- | |||
option domain-name "<%= @dnsdomain_real.first %>"; | |||
option domain-name-servers <%= @nameservers.join(', ') %>; | |||
<% if @dnssearchdomains && @dnssearchdomains != [] -%> |
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.
if @dnssearchdomains && [email protected]?
is possibly better from a style perspective?
Also matches other templates. See https://github.com/voxpupuli/puppet-dhcp/blob/master/templates/dhcpd.conf.ntp.erb#L2
Noted, fixed |
@yuav Great! Looking good to me. Looks like you need a rebase though. Could you also squash your commits? Thanks. |
Rebased. |
@yuav Thanks, but it's still showing conflicts. Perhaps you only rebased against your local master?? Did you forget to fetch and merge upstream master into your master first? |
History was messed up. Should be less broken now |
) | ||
end | ||
|
||
it 'has domain-search option with empty array' do |
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 is an extremely confusingly named test, it suggests that the expected result is a domain-search
option with nothing after it except an empty array, which I don't believe can actually be represented in dhcpd.conf
.
The test however checks that the domain-search
option is absent entirely.
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.
Should be fixed in PR #115
No description provided.