aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dns/tasks
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-03-02 09:07:58 +0800
committerAaron LI <aly@aaronly.me>2018-03-14 11:35:07 +0800
commite9aa03b6dc0f32c98d3088e4bcac5e847de4b08d (patch)
tree2bb977f3c5e137ccd20a92698f8a447a06dad054 /roles/dns/tasks
parent562731165ec849bf9644b9bff0f2d198ecc7f37c (diff)
downloadansible-dfly-vps-e9aa03b6dc0f32c98d3088e4bcac5e847de4b08d.tar.bz2
dns: update zones templates and add liwt.net zone
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