aboutsummaryrefslogtreecommitdiff
path: root/os/config/roles/network
diff options
context:
space:
mode:
Diffstat (limited to 'os/config/roles/network')
-rw-r--r--os/config/roles/network/tasks/main.yml3
-rw-r--r--os/config/roles/network/templates/en.network2
-rw-r--r--os/config/roles/network/templates/resolv.conf3
3 files changed, 6 insertions, 2 deletions
diff --git a/os/config/roles/network/tasks/main.yml b/os/config/roles/network/tasks/main.yml
index caa6bff..8b6d92d 100644
--- a/os/config/roles/network/tasks/main.yml
+++ b/os/config/roles/network/tasks/main.yml
@@ -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
diff --git a/os/config/roles/network/templates/en.network b/os/config/roles/network/templates/en.network
index b9b52e9..5e680da 100644
--- a/os/config/roles/network/templates/en.network
+++ b/os/config/roles/network/templates/en.network
@@ -5,5 +5,3 @@ Name={{ interface }}
Address={{ ipv4 }}/24
Address={{ ipv6 }}/64
Gateway=192.168.1.254
-DNS={{ ipv4 }}
-DNS={{ dns_server }}
diff --git a/os/config/roles/network/templates/resolv.conf b/os/config/roles/network/templates/resolv.conf
new file mode 100644
index 0000000..44c1897
--- /dev/null
+++ b/os/config/roles/network/templates/resolv.conf
@@ -0,0 +1,3 @@
+nameserver {{ ipv4 }}
+nameserver {{ dns_1 }}
+nameserver {{ dns_2 }}