diff --git a/ansible/roles/ironic/templates/ironic-dnsmasq.conf.j2 b/ansible/roles/ironic/templates/ironic-dnsmasq.conf.j2 index f7eb73eb63..aa55625e93 100644 --- a/ansible/roles/ironic/templates/ironic-dnsmasq.conf.j2 +++ b/ansible/roles/ironic/templates/ironic-dnsmasq.conf.j2 @@ -9,9 +9,8 @@ bind-interfaces {% set tag = item.tag | default('range_' ~ loop.index) %} {% set lease_time = item.lease_time | default(ironic_dnsmasq_dhcp_default_lease_time) %} dhcp-range=set:{{ tag }},{{ item.range }},{{ lease_time }} -{% if item.routers is defined %} -dhcp-option=tag:{{ tag }},option:router,{{ item.routers }} -{% endif %} +{% if item.routers is defined %}dhcp-option=tag:{{ tag }},option:router,{{ item.routers }}{% endif %} +{% if item.ntp_server is defined %}dhcp-option=tag:{{ tag }},option:ntp-server,{{ item.ntp_server }}{% endif %} {% endfor %} {% if api_address_family == 'ipv6' %} diff --git a/doc/source/reference/bare-metal/ironic-guide.rst b/doc/source/reference/bare-metal/ironic-guide.rst index bf57a8f146..62fc93673d 100644 --- a/doc/source/reference/bare-metal/ironic-guide.rst +++ b/doc/source/reference/bare-metal/ironic-guide.rst @@ -42,6 +42,16 @@ are possible by separating addresses with commas): - range: "192.168.5.100,192.168.5.110" routers: "192.168.5.1" +Together with an router there can be provided the NTP (time source) server. +For example it can be the same address as default router for the range: + +.. code-block:: yaml + + ironic_dnsmasq_dhcp_ranges: + - range: "192.168.5.100,192.168.5.110" + routers: "192.168.5.1" + ntp_server: "192.168.5.1" + To support DHCP relay, it is also possible to define a netmask in the range. It is advisable to also provide a router to allow the traffic to reach the Ironic server. diff --git a/releasenotes/notes/ironic-inspector-multiple-ranges-ntp-32568dcf640a7fc1.yaml b/releasenotes/notes/ironic-inspector-multiple-ranges-ntp-32568dcf640a7fc1.yaml new file mode 100644 index 0000000000..adb060a469 --- /dev/null +++ b/releasenotes/notes/ironic-inspector-multiple-ranges-ntp-32568dcf640a7fc1.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds the ability to provide the NTP (time source) server for multiple DHCP + ranges in the Ironic Inspector DHCP server.