aboutsummaryrefslogtreecommitdiff
path: root/roles/bind/tasks/download_zonefile.yml
blob: 9c0f4acbf922c617e80b68315f6668aca1dc59c7 (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
---
- name: Download zonefile
  uri:
    url: '{{ bind_zonefile_base_url }}/{{ item }}'
    return_content: yes
  delegate_to: localhost
  register: zonefile
  when: bind_zonefile_base_url != ""

- name: Install zonefile
  copy:
    dest: '/etc/bind/zonefiles/{{ item }}'
    content: '{{ zonefile.content }}'
  become: yes
  notify: Restart bind
  when: bind_zonefile_base_url != ""

- name: Copy zonefile
  copy:
    src: '{{ bind_zonefile_base_folder }}/{{ item }}'
    dest: '/etc/bind/zonefiles/{{ item }}'
  become: yes
  notify: Restart bind
  when: bind_zonefile_base_folder != ""