X-Git-Url: https://git.ralfj.de/ansible.git/blobdiff_plain/2765f5511a2b3774ec7c66a4e13aaf6df2668c2d..115d3cca0dcddd5c843d000e771e2de275e826a1:/roles/postfix/tasks/unbound.yml diff --git a/roles/postfix/tasks/unbound.yml b/roles/postfix/tasks/unbound.yml index 34fbe81..0fe643c 100644 --- a/roles/postfix/tasks/unbound.yml +++ b/roles/postfix/tasks/unbound.yml @@ -3,10 +3,20 @@ apt: name=unbound state=latest # configure - name: configure unbound + register: unbound_config copy: dest: /etc/unbound/unbound.conf.d/listen.conf src: files/unbound/listen.conf - register: unbound_config +- name: configure systemd (create dir) + file: path=/etc/systemd/system/unbound.service.d state=directory +- name: configure systemd (tweak unbound) + register: unbound_systemd + copy: + dest: /etc/systemd/system/unbound.service.d/override.conf + src: files/unbound/unbound.service.override +- name: reload systemd + when: unbound_systemd.changed + command: systemctl daemon-reload - name: restart unbound # not a handler to make sure it succeeds before we go touch system DNS when: unbound_config.changed