X-Git-Url: https://git.ralfj.de/ansible.git/blobdiff_plain/7273ecf5a25c5b4a418b8356482cafb922d59a3c:/roles/email/tasks/unbound.yml..ee0707947ed908dfcba302f36dacc330316382d8:/roles/unbound/tasks/static/git-favicon.png diff --git a/roles/email/tasks/unbound.yml b/roles/email/tasks/unbound.yml deleted file mode 100644 index 0fe643c..0000000 --- a/roles/email/tasks/unbound.yml +++ /dev/null @@ -1,36 +0,0 @@ -# install -- name: install unbound - 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 -- 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 - service: name=unbound state=restarted enabled=yes -# use as system DNS -- name: detect DHCP client - stat: path=/etc/dhcp/dhclient.conf - register: dhclient -- name: configure DHCP - when: dhclient.stat.exists == True - copy: - dest: /etc/dhcp/dhclient.conf - src: files/unbound/dhclient.conf -- name: configure system DNS - copy: - dest: /etc/resolv.conf - content: "nameserver 127.0.0.2\n"