X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/6701c75cd26e603cafa373db9ee75e6c099639e9..ce136e365e7258d85a27d44eb2817f881d78d25f:/cookbooks/networking/recipes/default.rb diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index fa3f97d00..eba2208f5 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -342,9 +342,14 @@ template "/etc/systemd/resolved.conf.d/99-chef.conf" do notifies :restart, "service[systemd-resolved]", :immediately end +if node[:filesystem][:by_mountpoint][:"/etc/resolv.conf"] + execute "umount-resolve-conf" do + command "umount -c /etc/resolv.conf" + end +end + link "/etc/resolv.conf" do to "../run/systemd/resolve/stub-resolv.conf" - not_if { ENV["TEST_KITCHEN"] } end zones = {} @@ -442,12 +447,14 @@ if node[:networking][:firewall][:enabled] action [:enable, :start] supports :restart => true status_command "shorewall status" + ignore_failure true end else service "shorewall" do action [:disable, :stop] supports :restart => true status_command "shorewall status" + ignore_failure true end end @@ -583,12 +590,14 @@ unless node.interfaces(:family => :inet6).empty? action [:enable, :start] supports :restart => true status_command "shorewall6 status" + ignore_failure true end else service "shorewall6" do action [:disable, :stop] supports :restart => true status_command "shorewall6 status" + ignore_failure true end end