From 005458d67e18e9f1884a55c38acc998d94b07c21 Mon Sep 17 00:00:00 2001 From: Nick Jones Date: Mon, 17 Dec 2018 15:37:39 +0000 Subject: [PATCH] [Designate] Configure named to also listen on 'dns_interface' Update the template so that if 'dns_interface' is set, named listens on this interface as well as the 'api_interface'. Change-Id: I986ca46e5599e4767800fcc7f34a1c6e682efb55 Closes-Bug: 1808829 --- ansible/roles/designate/templates/named.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/designate/templates/named.conf.j2 b/ansible/roles/designate/templates/named.conf.j2 index 1fa543cd38..94512c4d15 100644 --- a/ansible/roles/designate/templates/named.conf.j2 +++ b/ansible/roles/designate/templates/named.conf.j2 @@ -2,6 +2,9 @@ include "/etc/rndc.key"; options { listen-on port {{ designate_bind_port }} { {{ hostvars[inventory_hostname]['ansible_' + hostvars[inventory_hostname]['api_interface']]['ipv4']['address'] }}; }; + {% if api_interface != dns_interface %} + listen-on port {{ designate_bind_port }} { {{ hostvars[inventory_hostname]['ansible_' + hostvars[inventory_hostname]['dns_interface']]['ipv4']['address'] }}; }; + {% endif %} directory "/var/lib/named"; allow-new-zones yes; dnssec-validation {{ designate_dnssec_validation }};