Project

General

Profile

« Previous | Next » 

Revision f9b886b9

Added by Lorenz Bischof about 8 years ago

Add dhcp_search_domains parameter

View differences:

manifests/init.pp
# $dhcp_option_domain:: DHCP use the dhcpd config option domain-name
# type:array
#
# $dhcp_search_domains:: DHCP search domains option
# type:array
#
# $dhcp_interface:: DHCP listen interface
#
# $dhcp_gateway:: DHCP pool gateway
......
#
# $dhcp_nameservers:: DHCP nameservers
#
# $dhcp_server:: Address of DHCP server to manage
# $dhcp_server:: Address of DHCP server to manage
#
# $dhcp_config:: DHCP config file path
#
......
$dhcp_managed = $foreman_proxy::params::dhcp_managed,
$dhcp_provider = $foreman_proxy::params::dhcp_provider,
$dhcp_option_domain = $foreman_proxy::params::dhcp_option_domain,
$dhcp_search_domains = $foreman_proxy::params::dhcp_search_domains,
$dhcp_interface = $foreman_proxy::params::dhcp_interface,
$dhcp_gateway = $foreman_proxy::params::dhcp_gateway,
$dhcp_range = $foreman_proxy::params::dhcp_range,
manifests/params.pp
$dhcp_gateway = '192.168.100.1'
$dhcp_range = false
$dhcp_option_domain = [$::domain]
$dhcp_search_domains = undef
# This will use the IP of the interface in $dhcp_interface, override
# if you need to. You can make this a comma-separated string too - it
# will be split into an array
manifests/proxydhcp.pp
}
::dhcp::pool{ $::domain:
network => $net,
mask => $mask,
range => $foreman_proxy::dhcp_range,
gateway => $foreman_proxy::dhcp_gateway,
network => $net,
mask => $mask,
range => $foreman_proxy::dhcp_range,
gateway => $foreman_proxy::dhcp_gateway,
search_domains => $foreman_proxy::dhcp_search_domains,
}
}
spec/classes/foreman_proxy__proxydhcp__spec.rb
) end
end
context "with dhcp_search_domains" do
let :facts do
default_facts.merge({:ipaddress_eth0 => '127.0.1.1',
:netmask_eth0 => '255.0.0.0',
:network_eth0 => '127.0.0.0'})
end
let :pre_condition do
"class {'foreman_proxy':
dhcp_range => false,
dhcp_gateway => '127.0.0.254',
dhcp_search_domains => ['example.com', 'example.org']
}"
end
it do should contain_dhcp__pool('example.com').with(
'search_domains' => ['example.com','example.org']
) end
end
end
end
end

Also available in: Unified diff