@jdauphant : I don't have time to manage anymore this role. Don't hesitate to fork and made your own version.
Ansible role for configure DNS
- hosts: all
roles:
- role: ansible-role-dns
dns_domain: localdomain
dns_nameservers: ['127.0.0.1', '8.8.8.8']
- hosts: all
roles:
- role: ansible-role-dns
dns_nameservers: ['8.8.8.8']
dns_searchs: "localdomain otherdomain"
dns_options: ['timeout:3', 'attempts:5']