dns-witch-zones/config/roles/knot/tasks/main.yml

29 lines
471 B
YAML
Raw Normal View History

2021-06-04 13:23:13 +00:00
---
- name: Install knot
apt:
pkg:
- knot
- knot-dnsutils
- name: Update zones
ansible.builtin.copy:
2021-06-04 14:06:26 +00:00
src: '{{ zones_dir }}/'
2021-06-04 13:23:13 +00:00
dest: /var/lib/knot/zones
owner: knot
group: knot
mode: '0644'
notify: reload knot
2021-06-04 13:48:05 +00:00
when: "inventory_hostname in groups.primary"
2021-06-04 13:23:13 +00:00
- name:
template:
src: knot.conf.j2
dest: /etc/knot/knot.conf
notify: reload knot
- name: Start knot
service:
name: knot
state: started
enabled: yes