]> git.openstreetmap.org Git - chef.git/commitdiff
networking: install systemd-resolved when required
authorGrant Slater <github@firefishy.com>
Thu, 15 Jun 2023 15:53:45 +0000 (16:53 +0100)
committerGrant Slater <github@firefishy.com>
Thu, 15 Jun 2023 15:53:53 +0000 (16:53 +0100)
cookbooks/networking/recipes/default.rb

index 11c75daec981d3d63bdc422119db4780eb041427..60f3be44481bcd9365e2c7f4acd8c62761a8780b 100644 (file)
@@ -126,6 +126,11 @@ node[:networking][:interfaces].each do |_, interface|
   end
 end
 
   end
 end
 
+package "systemd-resolved" do
+  action :install
+  only_if { platform?("ubuntu") && node[:lsb][:release].to_f > 22.04 || platform?("debian") && node[:lsb][:release].to_f > 11.0 }
+end
+
 service "systemd-networkd" do
   action [:enable, :start]
 end
 service "systemd-networkd" do
   action [:enable, :start]
 end