---
- name: Disable resolvconf
service:
name: '{{ item }}'
state: stopped
enabled: false
with_items:
- resolvconf
- systemd-resolved
ignore_errors: true
- name: Configure /etc/resolv.conf
copy:
src: resolv.conf
dest: /etc/resolv.conf
attributes: 'ie'