From 41a475c5fb12d0bb82d596331796b8f375904c0a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 14 Jan 2022 15:37:07 +0100 Subject: bind: add file zonefile source --- roles/bind/tasks/download_zonefile.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'roles/bind/tasks/download_zonefile.yml') diff --git a/roles/bind/tasks/download_zonefile.yml b/roles/bind/tasks/download_zonefile.yml index 9e89507..9c0f4ac 100644 --- a/roles/bind/tasks/download_zonefile.yml +++ b/roles/bind/tasks/download_zonefile.yml @@ -5,6 +5,7 @@ return_content: yes delegate_to: localhost register: zonefile + when: bind_zonefile_base_url != "" - name: Install zonefile copy: @@ -12,4 +13,13 @@ 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 != "" -- cgit v1.2.3