X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/4e25113d66b5ae4a4fbedb7046bced6aee5eee22..645c0443f938774cf91ad21bde5f31d672f002e8:/cookbooks/networking/recipes/default.rb diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 03c7461a4..38c2156f2 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -185,7 +185,7 @@ end execute "hostnamectl-set-static" do command "hostnamectl set-static #{node[:networking][:hostname]}" notifies :reload, "ohai[reload-hostname]" - not_if { node[:hostnamectl][:static_hostname] == node[:networking][:hostname] } + not_if { ENV.key?("TEST_KITCHEN") || node[:hostnamectl][:static_hostname] == node[:networking][:hostname] } end template "/etc/hosts" do