]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/recipes/default.rb
Update upstream for fume
[chef.git] / cookbooks / networking / recipes / default.rb
index 03c7461a4253419ffcdb4a9efcd0c1addbe45a5e..6648998f054f9a5d540778164a18d2b6833d84bf 100644 (file)
@@ -182,10 +182,10 @@ 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 { 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