puppet-ironic/templates/inspector_dnsmasq_tftp.erb
Dmitry Tantsur f885bfd4ec inspector: configure "dnsmasq" DHCP filter
Co-Authored-By: Harald Jensås <hjensas@redhat.com>
Related-Bug: #1756075
Change-Id: I056cdadc025f35d8b6fd22f510a7c0a8e259a1f0
(cherry picked from commit 76e4a89922)
2018-03-16 06:38:57 +00:00

29 lines
778 B
Plaintext

port=0
interface=<%= @dnsmasq_interface %>
bind-interfaces
<% if @debug %>
log-dhcp
log-queries
<% end %>
<% @dnsmasq_ip_subnets_real.each do |s| -%>
<% if s['tag'] and s['netmask'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
<% elsif s['tag'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,10m
<% else -%>
dhcp-range=<%= s['ip_range'] -%>,10m
<% end -%>
<% if s['gateway'] -%>
<% if s['tag'] -%>
dhcp-option=tag:<%= s['tag'] -%>,option:router,<%= s['gateway'] %>
<% else -%>
dhcp-option=option:router,<%= s['gateway'] %>
<% end -%>
<% end -%>
<% end -%>
dhcp-boot=pxelinux.0,localhost.localdomain,<%= @dnsmasq_local_ip %>
dhcp-sequential-ip
<% if @dnsmasq_dhcp_hostsdir %>
dhcp-hostsdir=<%= @dnsmasq_dhcp_hostsdir %>
<% end %>