diff options
-rw-r--r-- | manifests/subsystem/dhclient.pp | 5 | ||||
-rw-r--r-- | templates/dhcp/dhclient.conf.erb | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/manifests/subsystem/dhclient.pp b/manifests/subsystem/dhclient.pp index 332dc34..1e714ab 100644 --- a/manifests/subsystem/dhclient.pp +++ b/manifests/subsystem/dhclient.pp @@ -1,6 +1,7 @@ class nodo::subsystem::dhclient( - $ensure = hiera('nodo::subsystem::dhclient::ensure', 'present'), - $supersede_domain = hiera('nodo::subsystem::dhclient::supersede_domain', $::domain) + $ensure = hiera('nodo::subsystem::dhclient::ensure', 'present'), + $supersede_domain_name = hiera('nodo::subsystem::dhclient::supersede_domain_name', $::domain) + $supersede_domain_search = hiera('nodo::subsystem::dhclient::supersede_domain_search', $::domain) ) { package { 'isc-dhcp-client': ensure => $ensure, diff --git a/templates/dhcp/dhclient.conf.erb b/templates/dhcp/dhclient.conf.erb index 1e27e2d..8590bb8 100644 --- a/templates/dhcp/dhclient.conf.erb +++ b/templates/dhcp/dhclient.conf.erb @@ -18,10 +18,12 @@ option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; #send dhcp-lease-time 3600; #prepend domain-name-servers 127.0.0.1; -<%- if @supersede_domain != '' then -%> +<%- if @supersede_domain_name != '' then -%> # Force a domain name, otherwise facter and other configurations might break. -supersede domain-name "<%= @supersede_domain %>"; -supersede domain-search "<%= @supersede_domain %>"; +supersede domain-name "<%= @supersede_domain_name %>"; +<%- end -%> +<%- if @supersede_domain_search != '' then -%> +supersede domain-search "<%= @supersede_domain_search %>"; <%- end -%> request subnet-mask, broadcast-address, time-offset, routers, |