diff options
author | Michael Gugino <mgugino@redhat.com> | 2017-10-25 17:01:26 -0400 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2017-10-25 17:03:27 -0400 |
commit | db50b11f29ee95fa6128257141bba9c39fe36de3 (patch) | |
tree | d3180f0ea9b9892b08f8f854b019c0d0edd7bfec /roles | |
parent | 2055aa066d8219393db64f42afc384c8123f48f2 (diff) | |
download | openshift-db50b11f29ee95fa6128257141bba9c39fe36de3.tar.gz openshift-db50b11f29ee95fa6128257141bba9c39fe36de3.tar.bz2 openshift-db50b11f29ee95fa6128257141bba9c39fe36de3.tar.xz openshift-db50b11f29ee95fa6128257141bba9c39fe36de3.zip |
Change dnsmasq to bind-interfaces + except-interfaces
Currently, we have to set the listen ip for dnsmasq via ansible
during installation.
This commit enables dnsmasq to bind-interfaces + exclude interfaces
to ensure dnsmasq doesn't listen on lo interface.
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_node_dnsmasq/defaults/main.yml | 5 | ||||
-rw-r--r-- | roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2 | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/roles/openshift_node_dnsmasq/defaults/main.yml b/roles/openshift_node_dnsmasq/defaults/main.yml index eae832fcf..ebcff46b5 100644 --- a/roles/openshift_node_dnsmasq/defaults/main.yml +++ b/roles/openshift_node_dnsmasq/defaults/main.yml @@ -1,2 +1,7 @@ --- openshift_node_dnsmasq_install_network_manager_hook: true + +# lo must always be present in this list or dnsmasq will conflict with +# the node's dns service. +openshift_node_dnsmasq_except_interfaces: +- lo diff --git a/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2 b/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2 index ef3ba2880..5c9601277 100644 --- a/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2 +++ b/roles/openshift_node_dnsmasq/templates/origin-dns.conf.j2 @@ -4,4 +4,7 @@ no-negcache max-cache-ttl=1 enable-dbus bind-interfaces -listen-address={{ openshift.node.dns_ip }} +{% for interface in openshift_node_dnsmasq_except_interfaces %} +except-interface={{ interface }} +{% endfor %} +# End of config |