From e9aa03b6dc0f32c98d3088e4bcac5e847de4b08d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 2 Mar 2018 09:07:58 +0800 Subject: dns: update zones templates and add liwt.net zone --- roles/dns/tasks/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'roles/dns/tasks') 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 -- cgit v1.2.2