]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Forceful open-vm-tools timeSync disable
[chef.git] / cookbooks / hardware / recipes / default.rb
index efe8f3b483cddf8e33253ba0e00b83976c0ad4d3..91b7510b97db6665ef591ca87509c9b732d36e44 100644 (file)
@@ -94,15 +94,22 @@ when "IBM"
 when "VMware, Inc."
   package "open-vm-tools"
 
-  service "open-vm-tools" do
-    action [:enable, :start]
-    supports :status => true, :restart => true
+  # Remove timeSync plugin completely
+  # https://github.com/vmware/open-vm-tools/issues/302
+  file "/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so" do
+    state :absent
+    notifies :restart, "service[open-vm-tools]"
   end
 
-  # May need additional work per:
-  # https://github.com/vmware/open-vm-tools/issues/302
+  # Attempt to tell Host we are not interested in timeSync
   execute "vmware-toolbox-cmd-timesync-disable" do
     command "/usr/bin/vmware-toolbox-cmd timesync disable"
+    ignore_failure true
+  end
+
+  service "open-vm-tools" do
+    action [:enable, :start]
+    supports :status => true, :restart => true
   end
 end