From 3f4bc1c50e523514026d1fe77ef8d3df0f8a0cf1 Mon Sep 17 00:00:00 2001 From: Jorge Niedbalski Date: Mon, 30 Apr 2018 09:08:14 -0300 Subject: [PATCH] Make DNS resolvers configurable. Change the default hardcoded values of the dnsmasq dns resolvers on dhcp_agent.ini.j2 to a configuration option part of group_vars/all.yml. Also adding 1.1.1.1 as part of the default set. Change-Id: I629c69e556d4ddba19f68f06627038e1886ae5f9 Signed-off-by: Jorge Niedbalski --- ansible/group_vars/all.yml | 3 +++ ansible/roles/neutron/templates/dhcp_agent.ini.j2 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 30f816bb27..1fcecc611f 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -657,6 +657,9 @@ neutron_tenant_network_types: "vxlan" neutron_compute_dvr_mode: "dvr" computes_need_external_bridge: "{{ enable_neutron_dvr | bool and (neutron_compute_dvr_mode == 'dvr' or inventory_hostname in groups['external-compute']) or enable_neutron_provider_networks | bool or enable_opendaylight | bool and neutron_plugin_agent != 'vmware_dvs' }}" +# Default DNS resolvers for virtual networks +neutron_dnsmasq_dns_servers: "1.1.1.1,8.8.8.8,8.8.4.4" + ####################### # Nova options ####################### diff --git a/ansible/roles/neutron/templates/dhcp_agent.ini.j2 b/ansible/roles/neutron/templates/dhcp_agent.ini.j2 index 6582157406..d5596ca316 100644 --- a/ansible/roles/neutron/templates/dhcp_agent.ini.j2 +++ b/ansible/roles/neutron/templates/dhcp_agent.ini.j2 @@ -3,7 +3,7 @@ dnsmasq_config_file = /etc/neutron/dnsmasq.conf enable_isolated_metadata = true force_metadata = true -dnsmasq_dns_servers = 8.8.8.8,8.8.4.4 +dnsmasq_dns_servers = {{ neutron_dnsmasq_dns_servers }} {% if neutron_plugin_agent == 'vmware_dvs' %} ovs_integration_bridge = {{ neutron_bridge_name }}