aboutsummaryrefslogtreecommitdiff
path: root/roles/bind
diff options
context:
space:
mode:
authorGravatar meisterfischy <grbmn@kstn.in> 2022-01-22 17:19:41 +0100
committerGravatar meisterfischy <grbmn@kstn.in> 2022-01-22 17:19:41 +0100
commit3db33ef566777f1963b6d6f0c7b6d7dcd14ed866 (patch)
tree0641584e2b2b753bcb9a540e38ab43c43ea15992 /roles/bind
parenta28793b684b3299c95e04924ed18e0fe5cd6f107 (diff)
parentd400f8820ad8e824ce454d9283e2bb8d6a28cdd3 (diff)
downloadansible_collection-3db33ef566777f1963b6d6f0c7b6d7dcd14ed866.tar.gz
Merge branch 'dev' of giteaprod-01.my.cum.re:infra/ansible-kompetenzbolzen-stuff into calibre
Diffstat (limited to 'roles/bind')
-rw-r--r--roles/bind/defaults/main.yml1
-rw-r--r--roles/bind/tasks/download_zonefile.yml10
2 files changed, 11 insertions, 0 deletions
diff --git a/roles/bind/defaults/main.yml b/roles/bind/defaults/main.yml
index bd90082..f242706 100644
--- a/roles/bind/defaults/main.yml
+++ b/roles/bind/defaults/main.yml
@@ -1,4 +1,5 @@
---
bind_zones: []
bind_zonefile_base_url: ''
+bind_zonefile_base_folder: ''
bind_install_zonefiles: false
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 != ""