kolla-ansible/ansible/roles/ironic/templates/ironic-dnsmasq.conf.j2
Mark Goddard ea2cda217e Fix ironic inspector dnsmasq listening interface
The variable 'ironic_dnsmasq_interface' is used to configure the interface
used by the ironic inspector dnsmasq service for DHCP on the inspection
network. It is being used correctly in inspector.conf, but not in the
dnsmasq configuration file, which uses api_interface. This change modifies
the dnsmasq configuration file to also use ironic_dnsmasq_interface.

Change-Id: I7670544f4bc41c93ac1d081486502f9ffb8f2286
Closes-Bug: #1785574
2018-08-06 09:26:14 +01:00

24 lines
902 B
Django/Jinja

port=0
interface={{ ironic_dnsmasq_interface }}
dhcp-range={{ ironic_dnsmasq_dhcp_range }}
{% if ironic_dnsmasq_default_gateway is not none %}
dhcp-option=3,{{ ironic_dnsmasq_default_gateway }}
{% endif %}
dhcp-option=option:tftp-server,{{ api_interface_address }}
dhcp-option=option:server-ip-address,{{ api_interface_address }}
bind-interfaces
dhcp-sequential-ip
dhcp-option=210,/tftpboot/
{% if enable_ironic_ipxe | bool %}
dhcp-match=ipxe,175
dhcp-match=set:efi,option:client-arch,7
dhcp-match=set:efi,option:client-arch,9
# Client is already running iPXE; move to next stage of chainloading
dhcp-option=tag:ipxe,option:bootfile-name,{{ ironic_ipxe_url }}/inspector.ipxe
# Client is PXE booting over EFI without iPXE ROM,
# send EFI version of iPXE chainloader
dhcp-option=tag:efi,tag:!ipxe,option:bootfile-name,ipxe.efi
{% endif %}
dhcp-option=option:bootfile-name,{{ ironic_dnsmasq_boot_file }}