Update pool when pools.yaml is changed
Move designate-mange pool update command to handlers since we need to run it only when pools.yaml is changed. We also don't need to restart designate service, when pools.yaml is updated. Change-Id: I7f3d6bd777ce5a6e0f3372f0f6e29cb5499d5419
This commit is contained in:
parent
1b6f3273fb
commit
87eb5d46cd
@ -59,6 +59,14 @@
|
||||
- "Restart designate services"
|
||||
- "venv changed"
|
||||
|
||||
- name: Perform Designate pools update
|
||||
command: "{{ designate_bin }}/designate-manage pool update --file /etc/designate/pools.yaml"
|
||||
become: yes
|
||||
become_user: "{{ designate_system_user_name }}"
|
||||
changed_when: false
|
||||
when: designate_pools_yaml is defined
|
||||
notify: Restart designate services
|
||||
|
||||
- name: Start services
|
||||
systemd:
|
||||
name: "{{ item.service_name }}"
|
||||
|
@ -18,11 +18,3 @@
|
||||
become: yes
|
||||
become_user: "{{ designate_system_user_name }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Perform a Designate DNS pools update
|
||||
command: "{{ designate_bin }}/designate-manage pool update"
|
||||
become: yes
|
||||
become_user: "{{ designate_system_user_name }}"
|
||||
changed_when: false
|
||||
when: designate_pools_yaml is defined
|
||||
notify: Restart designate services
|
||||
|
@ -69,6 +69,7 @@
|
||||
content: "{{ designate_pools_yaml | to_nice_yaml }}"
|
||||
dest: "/etc/designate/pools.yaml"
|
||||
when: designate_pools_yaml is defined
|
||||
notify: Perform Designate pools update
|
||||
|
||||
- name: Create Designate rndc key file
|
||||
template:
|
||||
|
Loading…
Reference in New Issue
Block a user