X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/f71ac318c6866183a879adda1c7ecef007a74924..a7de9e4abe76f8cd647eea949f99687fcc19254c:/cookbooks/networking/recipes/default.rb?ds=inline diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index c76d47e3e..4fbf463f2 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -104,7 +104,7 @@ node[:networking][:interfaces].each do |name, interface| deviceplan["parameters"]["lacp-rate"] = interface[:bond][:lacprate] if interface[:bond][:lacprate] end - if interface[:gateway] + if interface[:gateway] && interface[:gateway] != interface[:address] if interface[:family] == "inet" default_route = "0.0.0.0/0" elsif interface[:family] == "inet6" @@ -166,6 +166,10 @@ netplan["network"]["vlans"].each_value do |vlan| end end +file "/etc/netplan/00-installer-config.yaml" do + action :delete +end + file "/etc/netplan/01-netcfg.yaml" do action :delete end @@ -321,7 +325,7 @@ template "/etc/hosts" do owner "root" group "root" mode "644" - not_if { ENV["TEST_KITCHEN"] } + not_if { kitchen? } end service "systemd-resolved" do