From a77c52fbce78311a1538150a7fee68cbe606668e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 20 Mar 2023 20:52:00 +0000 Subject: [PATCH] Don't try and recreate bond and vlan devices --- cookbooks/networking/recipes/default.rb | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 7731511c0..47a9b8d60 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -266,15 +266,8 @@ elsif node[:networking][:engine] == "systemd-networkd" group "root" mode "644" variables :interface => interface, :vlan => Regexp.last_match(1) - notifies :run, "execute[networkctl-delete-#{interface[:interface]}]" notifies :run, "notify_group[networkctl-reload]" end - - execute "networkctl-delete-#{interface[:interface]}" do - action :nothing - command "networkctl delete #{interface[:interface]}" - only_if { ::File.exist?("/sys/class/net/#{interface[:interface]}") } - end elsif interface[:interface] =~ /^bond\d+$/ template "/etc/systemd/network/10-#{interface[:interface]}.netdev" do source "bond.netdev.erb" @@ -282,16 +275,9 @@ elsif node[:networking][:engine] == "systemd-networkd" group "root" mode "644" variables :interface => interface - notifies :run, "execute[networkctl-delete-#{interface[:interface]}]" notifies :run, "notify_group[networkctl-reload]" end - execute "networkctl-delete-#{interface[:interface]}" do - action :nothing - command "networkctl delete #{interface[:interface]}" - only_if { ::File.exist?("/sys/class/net/#{interface[:interface]}") } - end - interface[:bond][:slaves].each do |slave| file "/run/systemd/network/10-netplan-#{slave}.network" do action :delete -- 2.43.2