Added dns fix magic

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

5
files/resolv.conf Normal file
View File

@ -0,0 +1,5 @@
# This file is Ansible managed... or something
nameserver 152.66.208.1
nameserver 152.66.208.29
nameserver 152.66.115.1
nameserver 152.66.116.1

View File

@ -19,5 +19,8 @@
- name: "clean motd"
import_tasks: tasks/clean-motd.yaml
- name: "fix dns"
import_tasks: tasks/fix-dns-resolution.yaml
- name: "setup networking"
import_tasks: tasks/static-networking.yaml

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