kolla-ansible/ansible/roles/designate/tasks/backend_external.yml
James McCarthy d4f8b413a8 Update designate to allow use of external bind9 dns servers.
kolla designate DNSaaS makes use of containerised bind9 servers
as it's default designate_backend. These can be disabled by
setting designate_backend to "no". default: "bind9"

This commit adds two new properties:
1) designate_backend_external
 which can be enabled by setting it to 'bind9'. default: "no"
and
2) designate_backend_external_bind9_nameservers, which can
 accept a csv list of all the external server addresses.
 (default: "")

The following attributes should either be set:
'internal' (the default)
 designate_backend: "bind9"
 designate_backend_external: "no"
 (designate_backend_external_bind9_nameservers is ignored)
or
 'external'
 designate_backend: "no"
 designate_backend_external: "bind9"
 (designate_backend_external_bind9_nameservers must be populated)

Configuration override files to align with external bind9
dns servers must be supplied manually,
 /etc/kolla/config/designate/rndc.key
 /etc/kolla/config/designate/rndc.conf

Change-Id: I8dbe6fd4fe7820b9143604d89e8399b07e07c3fd
2017-09-18 13:51:39 +01:00

29 lines
994 B
YAML

---
- name: Copying over rndc.conf (designate_backend_external)
template:
src: "{{ node_custom_config }}/designate/rndc.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/rndc.conf"
register: designate_rndc_conf
when:
- designate_backend_external == 'bind9'
- item.key in [ "designate-worker" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-worker container
- name: Copying over rndc.key (designate_backend_external)
template:
src: "{{ node_custom_config }}/designate/rndc.key"
dest: "{{ node_config_directory }}/{{ item.key }}/rndc.key"
register: designate_rndc_key_file
when:
- designate_backend_external == 'bind9'
- item.key in [ "designate-worker" ]
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool
with_dict: "{{ designate_services }}"
notify:
- Restart designate-worker container