aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dns/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/dns/tasks')
-rw-r--r--roles/dns/tasks/main.yml8
1 files changed, 5 insertions, 3 deletions
diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml
index fe2a53a..cc5c07a 100644
--- a/roles/dns/tasks/main.yml
+++ b/roles/dns/tasks/main.yml
@@ -70,9 +70,11 @@
- name: NSD - generate zone files
template:
- src: "zones/{{ item }}.zone.j2"
- dest: "/usr/local/etc/nsd/zones/{{ item }}.zone"
- with_items: "{{ domains }}"
+ src: "{{ item }}"
+ dest: /usr/local/etc/nsd/zones/{{ item | basename | regex_replace('\.j2', '') }}
+ # NOTE: `with_fileglob` always operates from `files/`
+ with_fileglob:
+ - "../templates/zones/*.j2"
notify: reload-nsd
- name: NSD - enable and start service