From: Tom Hughes Date: Wed, 13 May 2020 19:41:14 +0000 (+0100) Subject: Fix hostnamect call X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/8fb894133e4aa2abe506cbca0012b162802a3e91 Fix hostnamect call --- diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 38c2156f2..6648998f0 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -182,8 +182,8 @@ ohai "reload-hostname" do plugin "hostname" end -execute "hostnamectl-set-static" do - command "hostnamectl set-static #{node[:networking][:hostname]}" +execute "hostnamectl-set-hostname" do + command "hostnamectl set-hostname #{node[:networking][:hostname]}" notifies :reload, "ohai[reload-hostname]" not_if { ENV.key?("TEST_KITCHEN") || node[:hostnamectl][:static_hostname] == node[:networking][:hostname] } end