You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dhcp does not run, because option domain-name-servers is empty (if you set nameservers to undef instead it will add the google nameservers)
What behaviour did you expect instead
generate a dhcpd.conf without "option domain-name-servers" and "option domain-name"
Any additional information you'd like to impart
simple fix would be the following:
diff --git a/environments/production/modules/dhcp/templates/dhcpd.conf-header.erb b/environments/production/modules/dhcp/templates/dhcpd.conf-header.erb
index 9f12b2a..bae1d36 100644
--- a/environments/production/modules/dhcp/templates/dhcpd.conf-header.erb
+++ b/environments/production/modules/dhcp/templates/dhcpd.conf-header.erb
@@ -13,8 +13,12 @@ log-facility <%= @logfacility %>;
# ----------
# Options
# ----------
+<% if @dnsdomain_real and !@dnsdomain_real.empty? -%>
option domain-name "<%= @dnsdomain_real.first %>";
+<% end -%>
+<% if @nameservers and @nameservers.is_a? Array and [email protected]? -%>
option domain-name-servers <%= @nameservers.join(', ') %>;
+<% end -%>
option fqdn.no-client-update on; # set the "O" and "S" flag bits
option fqdn.rcode2 255;
option pxegrub code 150 = text;
however, properly allow to supply undef to those options would be better (but might break the usage for people who would like to have the google-servers as default). At least there need to be the possibility to not supply nameservers at all.
The text was updated successfully, but these errors were encountered:
I would vote to change the default behaviour and not provide any default dns servers at all. These days, people should be able to configure this themselves with little to no effort using hiera.
We probably should bump the major version after this though.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
dhcp does not run, because option domain-name-servers is empty (if you set nameservers to undef instead it will add the google nameservers)
What behaviour did you expect instead
generate a dhcpd.conf without "option domain-name-servers" and "option domain-name"
Any additional information you'd like to impart
simple fix would be the following:
however, properly allow to supply undef to those options would be better (but might break the usage for people who would like to have the google-servers as default). At least there need to be the possibility to not supply nameservers at all.
The text was updated successfully, but these errors were encountered: