|
| 1 | +{% raw %} |
| 2 | +# NOTE(yoctozepto): ironic-dnsmasq is used to deliver DHCP(v6) service |
| 3 | +# DNS service is disabled: |
| 4 | +port=0 |
| 5 | + |
| 6 | +interface={{ ironic_dnsmasq_interface }} |
| 7 | +bind-interfaces |
| 8 | + |
| 9 | +{% for item in ironic_dnsmasq_dhcp_ranges %} |
| 10 | +{% set tag = item.tag | default('range_' ~ loop.index) %} |
| 11 | +{% set lease_time = item.lease_time | default(ironic_dnsmasq_dhcp_default_lease_time) %} |
| 12 | +dhcp-range=set:{{ tag }},{{ item.range }},{{ lease_time }} |
| 13 | +{% if item.routers is defined %}dhcp-option=tag:{{ tag }},option:router,{{ item.routers }}{% endif %} |
| 14 | +{% if item.ntp_server is defined %}dhcp-option=tag:{{ tag }},option:ntp-server,{{ item.ntp_server }}{% endif %} |
| 15 | +{% endfor %} |
| 16 | + |
| 17 | +{% if api_address_family == 'ipv6' %} |
| 18 | +{# TODO(yoctozepto): IPv6-only support - DHCPv6 PXE support #} |
| 19 | +{# different options must be used here #} |
| 20 | +{% else %}{# ipv4 #} |
| 21 | +dhcp-option=option:tftp-server,{{ api_interface_address }} |
| 22 | +dhcp-option=option:server-ip-address,{{ api_interface_address }} |
| 23 | +dhcp-option=210,/var/lib/ironic/tftpboot/ |
| 24 | +{% if ironic_dnsmasq_serve_ipxe | bool %} |
| 25 | +dhcp-match=ipxe,175 |
| 26 | +dhcp-match=set:efi,option:client-arch,7 |
| 27 | +dhcp-match=set:efi,option:client-arch,9 |
| 28 | +dhcp-match=set:aarchefi,option:client-arch,11 |
| 29 | +# Client is already running iPXE; move to next stage of chainloading |
| 30 | +dhcp-option=tag:ipxe,option:bootfile-name,{{ ironic_http_url }}/inspector.ipxe |
| 31 | +# Client is PXE booting over EFI without iPXE ROM, |
| 32 | +# send EFI version of iPXE chainloader |
| 33 | +dhcp-option=tag:efi,tag:!ipxe,option:bootfile-name,{{ ironic_dnsmasq_uefi_ipxe_boot_file }} |
| 34 | +dhcp-option=tag:aarchefi,tag:!ipxe,option:bootfile-name,ipxe-snponly-aarch64.efi |
| 35 | +{% endif %} |
| 36 | +dhcp-option=option:bootfile-name,{{ ironic_dnsmasq_boot_file }} |
| 37 | +{% endif %}{# ipv6/ipv4 #} |
| 38 | + |
| 39 | +log-async |
| 40 | +log-facility=/var/log/kolla/ironic/dnsmasq.log |
| 41 | +{% if ironic_logging_debug | bool %} |
| 42 | +log-dhcp |
| 43 | +{% endif %} |
| 44 | + |
| 45 | +{% if ironic_inspector_pxe_filter == 'dnsmasq' %} |
| 46 | +dhcp-hostsdir=/etc/dnsmasq/dhcp-hostsdir |
| 47 | +{% endif %} |
| 48 | +{% endraw %} |
0 commit comments