--- - name: Install knot become: yes apt: update_cache: yes pkg: - knot - knot-dnsutils - name: Update zones become: yes ansible.builtin.copy: src: '{{ zones_dir }}/' dest: /var/lib/knot/zones owner: knot group: knot mode: '0644' notify: reload knot when: "inventory_hostname in groups.primary" - name: Deploy conf become: yes template: src: knot.conf.j2 dest: /etc/knot/knot.conf notify: reload knot - name: Start knot become: yes service: name: knot state: started enabled: yes