--- - name: "Clone specified zone-repo to: /var/lib/bind/zones" git: repo: '{{ services.bind.zonesRepo }}' dest: /var/lib/named/zones force: true notify: "Restart bind" when: - services.bind.zonesRepo is defined - name: "Set correct permissions for: /var/lib/named" file: path: /var/lib/named owner: named group: named state: directory recurse: yes changed_when: false - name: "[Alpine] Generate named.conf" template: src: named.conf.j2 dest: /etc/bind/named.conf owner: named group: named notify: "Restart bind" when: - ansible_distribution == "Alpine" - name: "[Archlinux] Generate named.conf" template: src: named.conf.j2 dest: /etc/named.conf owner: named group: named notify: "Restart bind" when: - ansible_distribution == "Archlinux"