From 7a73fdc1569a4d36a2f5c486cdc933b1783f0fa5 Mon Sep 17 00:00:00 2001 From: Olivier Bourdon Date: Tue, 24 Apr 2018 12:46:41 +0200 Subject: [PATCH] Fix dnsmasq_router usage Change-Id: Ib9e371b6c9ec01de80c1c3b5c5c0267bf07e9c56 --- .../bifrost-ironic-install/templates/dnsmasq.conf.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 index 541dc0e60..72a68511b 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 @@ -71,11 +71,11 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},{{dhcp_lease_time}} # Override the default route supplied by dnsmasq, which assumes the # router is the same machine as the one running dnsmasq. -{% if dnsmasq_router is defined %} -{% if dnsmasq_router | bool == false %} -dhcp-option=3 -{% else %} +{% if not (dnsmasq_router | default(True) | bool) %} +{% if dnsmasq_router | ipaddr %} dhcp-option=3,{{dnsmasq_router}} +{% else %} +dhcp-option=3 {% endif %} {% endif %}