X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/bb9cec733c3da85e8be2627afdbc09549e8bbf6b..664bf10012bb509f923546981ad8c380ab3643e2:/cookbooks/networking/recipes/default.rb diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 11c75daec..103f8823b 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -41,6 +41,10 @@ file "/etc/netplan/99-chef.yaml" do action :delete end +package "ifupdown" do + action :purge +end + package "netplan.io" do action :purge end @@ -126,6 +130,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 @@ -390,6 +399,14 @@ if node[:networking][:wireguard][:enabled] end end +firewall_rule "accept-http-osm" do + action :accept + context :incoming + protocol :tcp + source :osm + dest_ports %w[http https] +end + firewall_rule "accept-http" do action :accept context :incoming