kolla-ansible/ansible/roles/designate/templates/named.conf.j2
Eduardo Gonzalez fae046ece8 Fixes bind9 restarting when no designate_forwarders_addresses
When deploying designate if no designate_forwarders_addresses
is provided, bind9 container keeps restarting due an invalid(empty)
forwarder addresses is set in named.conf

Change-Id: I7d309eb077243435dd2038629074251abec7d3e1
Closes-Bug: #1787092
2018-08-15 08:24:48 +02:00

21 lines
1.1 KiB
Django/Jinja

#jinja2: trim_blocks: False
include "/etc/rndc.key";
options {
listen-on port {{ designate_bind_port }} { {{ hostvars[inventory_hostname]['ansible_' + hostvars[inventory_hostname]['api_interface']]['ipv4']['address'] }}; };
directory "/var/lib/named";
allow-new-zones yes;
dnssec-validation {{ designate_dnssec_validation }};
auth-nxdomain no;
request-ixfr no;
recursion {{ designate_recursion }};
{% if designate_forwarders_addresses %}
forwarders { {{ designate_forwarders_addresses }}; };
{% endif %}
minimal-responses yes;
allow-notify { {% for host in groups['designate-worker'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }};{% endfor %} };
};
controls {
inet {{ hostvars[inventory_hostname]['ansible_' + hostvars[inventory_hostname]['api_interface']]['ipv4']['address'] }} port {{ designate_rndc_port }} allow { {% for host in groups['designate-worker'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}; {% endfor %} } keys { "rndc-key"; };
};