2a91a80186a3e0887c9d8a238ffe3d7e7f2a7567
[ansible.git] / roles / postfix / tasks / unbound.yml
1 # install
2 - name: install unbound
3   apt: name=unbound state=latest
4 # configure
5 - name: configure unbound
6   copy:
7     dest: /etc/unbound/unbound.conf.d/listen.conf
8     src: files/unbound/listen.conf
9   register: unbound_config
10 - name: restart unbound
11   # not a handler to make sure it succeeds before we go touch system DNS
12   when: unbound_config.changed
13   service: name=unbound state=restarted enabled=yes
14 - name: configure system DNS
15   copy:
16     dest: /etc/resolv.conf
17     content: "nameserver 127.0.0.2\n"