]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/recipes/default.rb
nominatim: remove some dead config options
[chef.git] / cookbooks / networking / recipes / default.rb
index 7bbf315057f5a67c2ad04ae85b1153a7ad655400..8569c731c21e4122f240a50b26d3afdabe0fe8cf 100644 (file)
@@ -104,7 +104,7 @@ node[:networking][:interfaces].each do |name, interface|
       deviceplan["parameters"]["lacp-rate"] = interface[:bond][:lacprate] if interface[:bond][:lacprate]
     end
 
       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"
       if interface[:family] == "inet"
         default_route = "0.0.0.0/0"
       elsif interface[:family] == "inet6"
@@ -156,7 +156,7 @@ end
 
 netplan["network"]["bonds"].each_value do |bond|
   bond["interfaces"].each do |interface|
 
 netplan["network"]["bonds"].each_value do |bond|
   bond["interfaces"].each do |interface|
-    netplan["network"]["ethernets"][interface] ||= { "accept-ra" => false }
+    netplan["network"]["ethernets"][interface] ||= { "accept-ra" => false, "optional" => true }
   end
 end
 
   end
 end
 
@@ -166,6 +166,10 @@ netplan["network"]["vlans"].each_value do |vlan|
   end
 end
 
   end
 end
 
+file "/etc/netplan/00-installer-config.yaml" do
+  action :delete
+end
+
 file "/etc/netplan/01-netcfg.yaml" do
   action :delete
 end
 file "/etc/netplan/01-netcfg.yaml" do
   action :delete
 end