From c4ea225e5f9bcb39ada3db2fcab60b703f7982a5 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Wed, 4 Feb 2015 15:28:11 +0100 Subject: [PATCH] Allow overriding the domain name per pool --- manifests/pool.pp | 1 + templates/dhcpd.pool.erb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/manifests/pool.pp b/manifests/pool.pp index 9c010850e..bf6a859f6 100644 --- a/manifests/pool.pp +++ b/manifests/pool.pp @@ -8,6 +8,7 @@ $parameters = '', $nameservers = undef, $pxeserver = undef, + $domain_name = '', ) { include dhcp::params diff --git a/templates/dhcpd.pool.erb b/templates/dhcpd.pool.erb index 651d19169..5977d7e72 100644 --- a/templates/dhcpd.pool.erb +++ b/templates/dhcpd.pool.erb @@ -18,6 +18,9 @@ subnet <%= @network %> netmask <%= @mask %> { } <% end -%> +<% if @domain_name and !@domain_name.empty? -%> + option domain-name <%= @domain_name %>; +<% end -%> option subnet-mask <%= @mask %>; <% if @gateway != '' -%> option routers <%= @gateway %>;