---

- name: Ensure package resolvconf is absent
  apt: name=resolvconf state=absent purge=yes 

- name: Ensure nameservers are set in resolv.conf
  copy:
    dest: /etc/resolv.conf
    content: "{% for ip in nameservers %}nameserver {{ ip }}\n{% endfor %}"
