From 3975b0b01735be506f5558484716a227c5f1f82c Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Thu, 15 Jun 2023 16:53:45 +0100 Subject: [PATCH] networking: install systemd-resolved when required --- cookbooks/networking/recipes/default.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 11c75daec..60f3be444 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -126,6 +126,11 @@ node[:networking][:interfaces].each do |_, interface| 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 -- 2.39.5