Reintroduce resolv.conf, it is needed + change DNS from FDN (broken) to Free

This commit is contained in:
Quentin 2020-10-22 20:22:57 +02:00
parent e465d65a27
commit 5902805ac9
5 changed files with 14 additions and 6 deletions

View File

@ -7,7 +7,8 @@ cluster_nodes:
ipv4: 192.168.1.2
ipv6: 2a01:e35:2fdc:dbe0::2
interface: eno1
dns_server: 80.67.169.40
dns_1: 212.27.40.240
dns_2: 212.27.40.241
ansible_python_interpreter: python3
silicareux:
@ -17,7 +18,8 @@ cluster_nodes:
ipv4: 192.168.1.3
ipv6: 2a01:e35:2fdc:dbe0::3
interface: eno1
dns_server: 80.67.169.40
dns_1: 212.27.40.240
dns_2: 212.27.40.241
ansible_python_interpreter: python3
wonse:
@ -27,5 +29,6 @@ cluster_nodes:
ipv4: 192.168.1.4
ipv6: 2a01:e35:2fdc:dbe0::4
interface: eno1
dns_server: 80.67.169.40
dns_1: 212.27.40.240
dns_2: 212.27.40.241
ansible_python_interpreter: python3

View File

@ -18,7 +18,8 @@
"dns": 53
},
"recursors": [
"{{ dns_server }}"
"{{ dns_1 }}",
"{{ dns_2 }}"
],
"encrypt": "{{ consul_gossip_encrypt }}",
"domain": "2.cluster.deuxfleurs.fr",

View File

@ -7,6 +7,9 @@
- name: "Deploy systemd-networkd configuration"
template: src=en.network dest=/etc/systemd/network/en.network
- name: "Deploy resolv.conf (the DNS section in systemd-networkd requires systemd-resolved...)"
template: src=resolv.conf dest=/etc/resolv.conf
- name: "Activate IP forwarding"
sysctl:
name: net.ipv4.ip_forward

View File

@ -5,5 +5,3 @@ Name={{ interface }}
Address={{ ipv4 }}/24
Address={{ ipv6 }}/64
Gateway=192.168.1.254
DNS={{ ipv4 }}
DNS={{ dns_server }}

View File

@ -0,0 +1,3 @@
nameserver {{ ipv4 }}
nameserver {{ dns_1 }}
nameserver {{ dns_2 }}