hac/ansible/roles/knot_resolver/tasks/main.yml

31 lines
689 B
YAML
Raw Permalink Normal View History

2024-03-24 22:12:56 +01:00
---
- 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:
2024-04-18 20:42:26 +02:00
- { port: "53", proto: tcp }
- { port: "53", proto: udp }