puppet-ironic/templates/inspector_dnsmasq_http.erb
Harald Jensas 90f862ce25 Deprecate 'dnsmasq_ip_range' replaced by 'dnsmasq_ip_subnets'
With support for multiple subnets in Ironic Inspector dnsmasq
a new parameter 'dnsmasq_ip_subnets' was added. With this new
parameter the 'dnsmasq_ip_range' is redundant and should be
deprecated.

Change-Id: I07cbdd5e5573df23d6bdbfff4588cd870be933d9
2017-03-13 16:22:35 +01:00

33 lines
1.1 KiB
Plaintext

port=0
interface=<%= @dnsmasq_interface %>
bind-interfaces
<% @dnsmasq_ip_subnets_real.each do |s| -%>
<% if s['tag'] and s['netmask'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,29
<% elsif s['tag'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,29
<% else -%>
dhcp-range=<%= s['ip_range'] -%>,29
<% 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-sequential-ip
dhcp-match=ipxe,175
<% if @enable_uefi -%>
dhcp-match=set:efi,option:client-arch,7
<% end -%>
# Client is running iPXE; move to next stage of chainloading
dhcp-boot=tag:ipxe,http://<%= @dnsmasq_local_ip %>:<%= @http_port_real %>/inspector.ipxe
<% if @enable_uefi -%>
# Client is running PXE over EFI; send EFI version of iPXE chainloader
dhcp-boot=tag:efi,ipxe.efi
# Client is running PXE over BIOS; send BIOS version of iPXE chainloader
<% end -%>
dhcp-boot=undionly.kpxe,localhost.localdomain,<%= @dnsmasq_local_ip %>