diff --git a/handlers/main.yml b/handlers/main.yml index f4f7761..dfc0269 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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 }}" diff --git a/tasks/designate_db_sync.yml b/tasks/designate_db_sync.yml index 98235e9..61f0122 100644 --- a/tasks/designate_db_sync.yml +++ b/tasks/designate_db_sync.yml @@ -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 diff --git a/tasks/designate_post_install.yml b/tasks/designate_post_install.yml index 86d356b..b61494a 100644 --- a/tasks/designate_post_install.yml +++ b/tasks/designate_post_install.yml @@ -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: