--- - name: Store dns entries at dns host copy: content: "{{ all_entries }}" dest: "{{ domain_zone_file }}" owner: root group: root mode: u=rw,g=r,o= register: result_store_entries delegate_to: "{{ dns_system_domain }}" - name: Rebuild zone files make: chdir: "{{ global_dns_zones_environment_directory }}" when: result_store_entries.changed register: result_rebuild_zone delegate_to: "{{ dns_system_domain }}" - name: Reload bind9 systemd: name: bind9 state: reloaded when: result_rebuild_zone.changed delegate_to: "{{ dns_system_domain }}"