infra/roles/dnscommon/tasks/main.yml
2024-01-02 02:10:54 -05:00

31 lines
625 B
YAML

---
- name: install BIND
apt: name=bind9 state=latest
- name: install BIND-utils
apt: name=bind9-utils state=latest
- name: copy named.conf.options
copy:
src: ../files/named.conf.options
dest: /etc/bind/named.conf.options
owner: bind
group: bind
mode: 0644
- name: restart & enable BIND
service: name=named state=restarted enabled=yes
- name: allow dns from everywhere via udp
ufw:
rule: allow
port: '53'
proto: udp
- name: allow dns from everywhere via tcp
ufw:
rule: allow
port: '53'
proto: tcp
- name: restart ufw
service: name=ufw state=restarted enabled=yes