Remove hardcoded designate backend

Add conditionals to deploy bind9 as backend
for designate, this way will easy third parties
to deploy or develop custom backends.

Change-Id: Ie61a3927ecb9366476cf3fbe0a866f8ea843d100
This commit is contained in:
Eduardo Gonzalez 2017-01-20 12:01:53 +00:00
parent 78b8f47bd5
commit 89447107b5
7 changed files with 25 additions and 3 deletions

View File

@ -440,6 +440,8 @@ cloudkitty_collector_backend: "ceilometer"
#######################
# Designate options
#######################
# Valid options are [ bind9 ]
designate_backend: "bind9"
designate_ns_record: "sample.openstack.org"
#######################

View File

@ -61,6 +61,9 @@
- "{{ node_custom_config }}/designate/designate-backend-bind9/named.conf"
- "{{ node_custom_config }}/designate/named.conf"
- "{{ role_path }}/templates/named.conf.j2"
when:
- designate_backend == 'bind9'
- inventory_hostname in groups['designate-backend-bind9']
- name: Copying over rndc.conf
template:
@ -69,6 +72,10 @@
with_items:
- "designate-backend-bind9"
- "designate-worker"
when:
- designate_backend == 'bind9'
- inventory_hostname in groups['designate-backend-bind9']
or inventory_hostname in groups['designate-worker']
- name: Copying over rndc.key
template:
@ -77,6 +84,10 @@
with_items:
- "designate-backend-bind9"
- "designate-worker"
when:
- designate_backend == 'bind9'
- inventory_hostname in groups['designate-backend-bind9']
or inventory_hostname in groups['designate-worker']
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/designate/policy.json"

View File

@ -36,6 +36,7 @@
connect_timeout: 1
state: stopped
when:
- designate_backend == 'bind9'
- container_facts['designate_backend_bind9'] is not defined
- inventory_hostname in groups['designate-backend-bind9']
@ -46,5 +47,6 @@
connect_timeout: 1
state: stopped
when:
- designate_backend == 'bind9'
- container_facts['designate_backend_bind9'] is not defined
- inventory_hostname in groups['designate-backend-bind9']

View File

@ -39,4 +39,6 @@
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ designate_backend_bind9_image_full }}"
when: inventory_hostname in groups['designate-backend-bind9']
when:
- designate_backend == 'bind9'
- inventory_hostname in groups['designate-backend-bind9']

View File

@ -10,7 +10,9 @@
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
- "designate_backend_bind9:/var/lib/named/"
when: inventory_hostname in groups['designate-backend-bind9']
when:
- designate_backend == 'bind9'
- inventory_hostname in groups['designate-backend-bind9']
- name: Starting designate-central container
kolla_docker:

View File

@ -1,3 +1,4 @@
{% if designate_backend == 'bind9' %}
- name: default-bind
id: {{ designate_pool_id }}
description: Default BIND9 Pool
@ -26,3 +27,4 @@
rndc_port: {{ designate_rndc_port }}
rndc_key_file: /etc/designate/rndc.key
{% endfor %}
{% endif %}

View File

@ -253,9 +253,10 @@ kolla_internal_vip_address: "10.10.10.254"
#######################
# Designate options
#######################
# Valid options are [ bind9 ]
designate_backend: "bind9"
designate_ns_record: "sample.openstack.org"
#########################
# Nova - Compute Options
#########################