[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
This commit is contained in:
Nick Jones 2018-12-17 15:37:39 +00:00
parent a4bddfdb36
commit 005458d67e
No known key found for this signature in database
GPG Key ID: F6D24C8669938334

View File

@ -2,6 +2,9 @@
include "/etc/rndc.key"; include "/etc/rndc.key";
options { options {
listen-on port {{ designate_bind_port }} { {{ hostvars[inventory_hostname]['ansible_' + hostvars[inventory_hostname]['api_interface']]['ipv4']['address'] }}; }; 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"; directory "/var/lib/named";
allow-new-zones yes; allow-new-zones yes;
dnssec-validation {{ designate_dnssec_validation }}; dnssec-validation {{ designate_dnssec_validation }};