infra/roles/dnscommon/tasks/main.yml

29 lines
561 B
YAML

---
- name: install BIND
apt: name=bind9 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