#
# Arguments
# $template: dhcp host template - default: 'dhcp/host.conf.erb'
+# $global_options: global options for the whole bunch of hosts.
+# you may override it per host, setting the host "options"
+# directly in the hash.
# $subnet: targeted subnet
# $hash_data: hash containing data - default form:
# {
define dhcp::hosts (
$hash_data,
$subnet,
+ $global_options = false,
$template = 'dhcp/host.conf.erb',
) {
host <%= host %>-<%= if_name %> {
hardware ethernet <%= if_mac %>;
<% if datas.fetch('fixed_address', false) -%>
- fixed-address <%= datas.fetch('fixed_address') %>
+ fixed-address <%= datas.fetch('fixed_address') %>;
<% else -%>
- fixed-address <%= host %>
+ fixed-address <%= host %>;
<% end -%>
<% if datas.fetch('option', false) -%>
<%= datas.fetch('option') %>
+<% elsif @global_options -%>
+ <%= @global_options %>
<% end -%>
}
<% end -%>