From 7c455a288a9e8c6bbe7560222a9f7c68c3f61160 Mon Sep 17 00:00:00 2001 From: Phil Dibowitz Date: Fri, 22 Mar 2024 08:45:05 -0700 Subject: [PATCH] Fix fb_systemd on hosts without networkd (#236) Test Plan: Tested that this didn't result in a networkd config change on CentOS9, and that it stops managing the networkd config on CentOS8, which is fine since we aren't using networkd on CentOS8 at least internally. anitazha did some testing of this internal to Meta already, plus I've rolled this out to the SCALE infra Differential Revision: D55154300 fbshipit-source-id: db4822e2df0ab65258a204c881afd042898cd0a5 --- cookbooks/fb_systemd/recipes/networkd.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/fb_systemd/recipes/networkd.rb b/cookbooks/fb_systemd/recipes/networkd.rb index 0f4d531e..667bee28 100644 --- a/cookbooks/fb_systemd/recipes/networkd.rb +++ b/cookbooks/fb_systemd/recipes/networkd.rb @@ -19,6 +19,7 @@ # fb_helpers_gated_template '/etc/systemd/networkd.conf' do + only_if { node['fb_systemd']['networkd']['enable'] } allow_changes node.nw_changes_allowed? source 'systemd.conf.erb' owner node.root_user