Make sure resolv.conf is using the systemd-resolved stub resolver
authorTom Hughes <tom@compton.nu>
Tue, 11 Feb 2020 11:12:49 +0000 (11:12 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 11 Feb 2020 11:12:49 +0000 (11:12 +0000)
cookbooks/networking/recipes/default.rb

index d9e264cd9c0dd3ece32ee5f53fcc73d1f8f8b4bd..cfc04cbef93868de5561c40eb9f1e9038ae1eb0b 100644 (file)
@@ -215,6 +215,10 @@ template "/etc/systemd/resolved.conf.d/99-chef.conf" do
   notifies :restart, "service[systemd-resolved]", :immediately
 end
 
+link "/etc/resolv.conf" do
+  to "../run/systemd/resolve/stub-resolv.conf"
+end
+
 if node[:networking][:tcp_fastopen_key]
   fastopen_keys = data_bag_item("networking", "fastopen")