diff --git a/playbooks/roles/bifrost-ironic-install/README.md b/playbooks/roles/bifrost-ironic-install/README.md index c7c94ead1..7251f520b 100644 --- a/playbooks/roles/bifrost-ironic-install/README.md +++ b/playbooks/roles/bifrost-ironic-install/README.md @@ -74,6 +74,10 @@ If you chose to utilize the dhcp server, You may wish to set default ranges: dhcp_pool_start: 192.168.1.200 dhcp_pool_end: 192.168.1.250 +If you want to use bifrost as a dhcp relay target, please set ``dhcp_pool_mask``: + +dhcp_pool_mask: 255.255.255.0 + And also set the default dhcp address lease time: dhcp_lease_time: 12h diff --git a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 index 478ce4cf7..78d725fb2 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 @@ -66,7 +66,7 @@ dhcp-range=192.168.122.2,192.168.122.254,12h {% elif inventory_dhcp | bool == true %} dhcp-range={{dhcp_pool_start}},static,{{dhcp_static_mask}},{{dhcp_lease_time}} {% else %} -dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},{{dhcp_lease_time}} +dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},{% if dhcp_pool_mask is defined %}{{dhcp_pool_mask}},{% endif %}{{dhcp_lease_time}} {% endif %} # Override the default route supplied by dnsmasq, which assumes the diff --git a/releasenotes/notes/dhcp_pool_mask-6d9bd4d1b78be0ab.yaml b/releasenotes/notes/dhcp_pool_mask-6d9bd4d1b78be0ab.yaml new file mode 100644 index 000000000..6ec10ad6d --- /dev/null +++ b/releasenotes/notes/dhcp_pool_mask-6d9bd4d1b78be0ab.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds support for using dnsmasq as a DHCP relay target via the new + ``dhcp_pool_mask`` parameter.