]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Use supersede_domain_name and supersede_domain_search
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 5 Apr 2016 19:26:28 +0000 (16:26 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 5 Apr 2016 19:26:28 +0000 (16:26 -0300)
manifests/subsystem/dhclient.pp
templates/dhcp/dhclient.conf.erb

index 332dc3462426ea7c6be540e540e16aea45f81347..1e714abf5607bdcc82e56264ad1e2022f538774e 100644 (file)
@@ -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,
index 1e27e2da3844c47888fae96f9b720f8a695e58f7..8590bb8bfba124f17ed15bbcd05ad475736226ef 100644 (file)
@@ -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,