---

- name: Install unbound
  pacman: name=unbound

- name: Install unbound config file
  template: src=unbound.conf.j2 dest=/etc/unbound/unbound.conf owner=root group=root mode=0644
  notify:
    - restart unbound

- name: Create remote-control keys
  command: unbound-control-setup creates=/etc/unbound/unbound_control.key

- name: Active service
  service: name=unbound state=started enabled=yes
