Added dns fix magic

This commit is contained in:
2021-11-09 03:11:35 +01:00
parent f851f907d1
commit 1ca623a038
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,24 @@
- name: "disable systemd-resolved"
systemd:
name: systemd-resolved
state: stopped
enabled: no
masked: yes
- name: check if resolvconf linked
stat:
path: /etc/resolv.conf
register: link
- name: remove symlink
file:
path: /etc/resolv.conf
state: absent
when: link.stat.islnk is defined and link.stat.islnk
- name: set very good resolv config
copy:
src: resolv.conf
dest: /etc/resolv.conf
mode: 644
owner: root