diff --git a/tasks/config.yaml b/tasks/config.yaml index eb9bb47..dc84ed3 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -3,10 +3,19 @@ # configure unbound - name: "config - unbound" ansible.builtin.template: - src: "{{ item }}" - dest: "/etc/unbound/unbound.conf.d/" + src: "templates/unbound/unbound.conf.j2" + dest: "/etc/unbound/unbound.conf" + owner: "root" + group: "root" + mode: "0644" + notify: "restart unbound" + +# configure unbound zones +- name: "config - unbound zones" + ansible.builtin.template: + src: "templates/unbound/zones.conf.j2" + dest: "/etc/unbound/zones.conf" owner: "root" group: "root" mode: "0644" - with_fileglob: "templates/unbound/*.j2" notify: "restart unbound" diff --git a/templates/unbound/unbound.conf.j2 b/templates/unbound/unbound.conf.j2 index d276fab..6451455 100644 --- a/templates/unbound/unbound.conf.j2 +++ b/templates/unbound/unbound.conf.j2 @@ -30,7 +30,7 @@ server: use-caps-for-id: no # include zone configurations - include: "/etc/unbound/conf.d/*.conf" + include: "/etc/unbound/zones.conf" # forward zones configuration forward-zone: