diff --git a/playbooks/inventory/group_vars/localhost b/playbooks/inventory/group_vars/localhost index 4a5d1217c..9bbbea937 100644 --- a/playbooks/inventory/group_vars/localhost +++ b/playbooks/inventory/group_vars/localhost @@ -57,3 +57,8 @@ transform_boot_image: false # Create IPA image instead of downloading an pre-made CoreOS IPA image. create_ipa_image: false + +# Dnsmasq default route for clients. If not defined, dnsmasq will push to clients +# as default route the same IP of the dnsmasq server. +# Default: undefined +# dnsmasq_router: {{ ipv4_gateway }} diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 2f352b28e..e708f638a 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -45,8 +45,12 @@ shade_git_folder: /opt/stack/shade dib_git_folder: /opt/stack/diskimage-builder # Comma separated list, in the format of a string, of drivers that are enabled. enabled_drivers: "agent_ipmitool,pxe_amt,agent_ilo,agent_ucs" -# DHCP pool for requests +# DHCP pool for requests. dhcp_pool_start: 192.168.1.200 dhcp_pool_end: 192.168.1.250 # Default network interface that Bifrost will be attached to. network_interface: "virbr0" +# Dnsmasq default route for clients. If not defined, dnsmasq will push to clients +# as default route the same IP of the dnsmasq server. +# Default: undefined +# dnsmasq_router: diff --git a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 index 89794eb82..88234734e 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 @@ -321,9 +321,11 @@ dhcp-range={{dhcp_pool_start}},{{dhcp_pool_end}},12h # Override the default route supplied by dnsmasq, which assumes the # router is the same machine as the one running dnsmasq. -#dhcp-option=3,1.2.3.4 +{% if dnsmasq_router is defined %} +dhcp-option=3,{{dnsmasq_router}} +{% endif %} -# Do the same thing, but using the option name +# Do the same thing, but using the option name. #dhcp-option=option:router,1.2.3.4 # Override the default route supplied by dnsmasq and send no default