30 lines
689 B
YAML
30 lines
689 B
YAML
---
|
|
- name: Install knot repository
|
|
ansible.builtin.apt:
|
|
deb: https://secure.nic.cz/files/knot-resolver/knot-resolver-release.deb
|
|
notify:
|
|
- Package cache update
|
|
|
|
- name: Install knot resolver
|
|
ansible.builtin.apt:
|
|
name: knot-resolver
|
|
notify:
|
|
- Enable knot resolver
|
|
- Restart knot resolver
|
|
|
|
- name: Configure
|
|
ansible.builtin.template:
|
|
src: kresd.conf.j2
|
|
dest: /etc/knot-resolver/kresd.conf
|
|
mode: "0644"
|
|
notify:
|
|
- Restart knot resolver
|
|
|
|
- name: Allow port 53 (DNS)
|
|
community.general.ufw:
|
|
rule: allow
|
|
port: "{{ item.port }}"
|
|
proto: "{{ item.proto }}"
|
|
with_items:
|
|
- { port: "53", proto: tcp }
|
|
- { port: "53", proto: udp }
|