kolla-ansible/ansible/roles/designate/templates/pools.yaml.j2
Kevin TIBI c2d150d6be Change listen for mdns
The service listening port of MDNS can be override by dns_interface.
If so, the pool conf use the wrong IP for join mdns service.

Change-Id: I8a3678955ecf5f769da7090fe5dad68e027c102b
2017-11-21 15:04:24 +00:00

56 lines
2.2 KiB
Django/Jinja

{% if designate_backend == 'bind9' or designate_backend_external == 'bind9' %}
- name: default-bind
id: {{ designate_pool_id }}
description: Default BIND9 Pool
attributes: {}
ns_records:
- hostname: {{ designate_ns_record }}.
priority: 1
nameservers:
{% if designate_backend == 'bind9' %}
{% for host in groups['designate-backend-bind9'] %}
- host: {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}
port: {{ designate_bind_port }}
{% endfor %}
{% elif designate_backend_external == 'bind9' %}
{% for host in designate_backend_external_bind9_nameservers.replace(" ", "").split(',') %}
- host: {{ host }}
port: {{ designate_bind_port }}
{% endfor %}
{% endif %}
targets:
{% if designate_backend == 'bind9' %}
{% for bind_host in groups['designate-backend-bind9'] %}
- type: bind9
description: BIND9 Server {{ hostvars[bind_host]['ansible_' + hostvars[bind_host]['api_interface']]['ipv4']['address'] }}
masters:
{% for mdns_host in groups['designate-mdns'] %}
- host: {{ hostvars[mdns_host]['ansible_' + hostvars[mdns_host]['dns_interface']]['ipv4']['address'] }}
port: {{ designate_mdns_port }}
{% endfor %}
options:
host: {{ hostvars[bind_host]['ansible_' + hostvars[bind_host]['api_interface']]['ipv4']['address'] }}
port: {{ designate_bind_port }}
rndc_host: {{ hostvars[bind_host]['ansible_' + hostvars[bind_host]['api_interface']]['ipv4']['address'] }}
rndc_port: {{ designate_rndc_port }}
rndc_key_file: /etc/designate/rndc.key
{% endfor %}
{% elif designate_backend_external == 'bind9' %}
{% for bind_host in designate_backend_external_bind9_nameservers.replace(" ", "").split(',') %}
- type: bind9
description: BIND9 Server {{ bind_host }}
masters:
{% for mdns_host in groups['designate-mdns'] %}
- host: {{ hostvars[mdns_host]['ansible_' + hostvars[mdns_host]['dns_interface']]['ipv4']['address'] }}
port: {{ designate_mdns_port }}
{% endfor %}
options:
host: {{ bind_host }}
port: {{ designate_bind_port }}
rndc_host: {{ bind_host }}
rndc_port: {{ designate_rndc_port }}
rndc_key_file: /etc/designate/rndc.key
{% endfor %}
{% endif %}
{% endif %}