summaryrefslogtreecommitdiff
path: root/roles/dnscommon/tasks/main.yml
blob: c7547d705e6065a240ac1995b6bb53ad81244ba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- 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