X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/ea29fb4b7d50ab732fdb5a1f5942254d09e538cb..1dfb3a0bf24b6c261191fff05c632f8f6331e038:/cookbooks/hardware/recipes/default.rb diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index ff02962db..fa5f43c64 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -17,8 +17,11 @@ # limitations under the License. # -include_recipe "tools" +include_recipe "apt" +include_recipe "git" include_recipe "munin" +include_recipe "sysfs" +include_recipe "tools" ohai_plugin "hardware" do template "ohai.rb.erb" @@ -91,6 +94,26 @@ when "Supermicro" end when "IBM" units << "0" +when "VMware, Inc." + package "open-vm-tools" + + # Remove timeSync plugin completely + # https://github.com/vmware/open-vm-tools/issues/302 + file "/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so" do + action :delete + notifies :restart, "service[open-vm-tools]" + end + + # 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 units.sort.uniq.each do |unit| @@ -239,6 +262,7 @@ if tools_packages.include?("areca") repository "https://git.openstreetmap.org/private/areca.git" user "root" group "root" + not_if { ENV["TEST_KITCHEN"] } end else directory "/opt/areca" do @@ -537,10 +561,18 @@ unless Dir.glob("/sys/class/hwmon/hwmon*").empty? end if node[:hardware][:shm_size] + execute "remount-dev-shm" do + action :nothing + command "/bin/mount -o remount /dev/shm" + user "root" + group "root" + end + mount "/dev/shm" do - action [:mount, :remount, :enable] + action :enable device "tmpfs" fstype "tmpfs" options "rw,nosuid,nodev,size=#{node[:hardware][:shm_size]}" + notifies :run, "execute[remount-dev-shm]" end end