aboutsummaryrefslogtreecommitdiff
path: root/roles/bind/tasks/main.yml
blob: 603e142e7f7275820548337df3590995047f1368 (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
31
32
33
---
- name: Install BIND9
  ansible.builtin.apt:
    name:
      - bind9
      - bind9utils
      - bind9-doc
  become: yes

- name: Copy configuration
  copy:
    src: named.conf.options
    dest: /etc/bind/named.conf.options
  become: yes
  notify: Restart bind

- name: Install zone config
  template:
    src: named.conf.local.j2
    dest: /etc/bind/named.conf.local
  become: yes
  notify: Restart bind

- name: Create folder
  file:
    state: directory
    path: /etc/bind/zonefiles
  become: yes

- name: Download and install Zonefiles
  include_tasks: download_zonefile.yml
  when: bind_install_zonefiles
  loop: '{{ bind_zones }}'