X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/3e0644bc430ad08eef063a8d3b462c2d95621d1d..b7c12630cb9de017d76fe60ff296534d6d061399:/cookbooks/networking/recipes/default.rb?ds=inline diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index cb4f741d9..2f60280f0 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -23,6 +23,8 @@ require "ipaddr" require "yaml" +include_recipe "ruby" + keys = data_bag_item("networking", "keys") file "/etc/netplan/00-installer-config.yaml" do @@ -41,6 +43,10 @@ file "/etc/netplan/99-chef.yaml" do action :delete end +package "ifupdown" do + action :purge +end + package "netplan.io" do action :purge end @@ -262,6 +268,16 @@ if node[:networking][:wireguard][:enabled] end end +# Setup dokken network in systemd-networkd to avoid systemd-networkd-wait-online delay +template "/etc/systemd/network/dokken.network" do + source "dokken.network.erb" + owner "root" + group "root" + mode "644" + notifies :run, "execute[networkctl-reload]", :immediately + only_if { kitchen? } +end + notify_group "networkctl-reload" execute "networkctl-reload" do @@ -317,6 +333,16 @@ link "/etc/resolv.conf" do to "../run/systemd/resolve/stub-resolv.conf" end +gem_package "dbus-systemd" do + gem_binary node[:ruby][:gem] +end + +prometheus_exporter "resolved" do + port 10028 + user "systemd-resolve" + restrict_address_families "AF_UNIX" +end + hosts = { :inet => [], :inet6 => [] } search(:node, "networking:interfaces").collect do |n|