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
31
32
33
34
35
36
37
38
39
---
- name: "Clone specified zone-repo to: /var/lib/bind/zones"
git:
repo: '{{ services.bind.zonesRepo }}'
dest: /var/lib/named/zones
force: true
notify: "Restart bind"
when:
- services.bind.zonesRepo is defined
- name: "Set correct permissions for: /var/lib/named"
file:
path: /var/lib/named
owner: named
group: named
state: directory
recurse: yes
changed_when: false
- name: "[Alpine] Generate named.conf"
template:
src: named.conf.j2
dest: /etc/bind/named.conf
owner: named
group: named
notify: "Restart bind"
when:
- ansible_distribution == "Alpine"
- name: "[Archlinux] Generate named.conf"
template:
src: named.conf.j2
dest: /etc/named.conf
owner: named
group: named
notify: "Restart bind"
when:
- ansible_distribution == "Archlinux"