Skip to content

Commit

Permalink
Merge pull request crowbar#1527 from vuntz/systemd-detect-virt
Browse files Browse the repository at this point in the history
rabbitmq: Use systemd-detect-virt instead of custom code
  • Loading branch information
vuntz authored Jan 22, 2018
2 parents 8133919 + 68bd590 commit 8531e78
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions chef/cookbooks/rabbitmq/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,9 @@
notifies :restart, "service[rabbitmq-server]"
end

virtualized = [
"KVM", "QEMU", "Bochs",
"VMWare Virtual Platform", "VMware Virtual Platform",
"VirtualBox"
]
hipe_compile = node[:rabbitmq][:hipe_compile] &&
node[:dmi][:system] &&
!virtualized.include?(node[:dmi][:system][:product_name]) &&
!virtualized.include?(node[:dmi][:system][:manufacturer])
`systemd-detect-virt -v -q`
virtualized = $?.exitstatus.zero?
hipe_compile = node[:rabbitmq][:hipe_compile] && !virtualized

template "/etc/rabbitmq/rabbitmq.config" do
source "rabbitmq.config.erb"
Expand Down

0 comments on commit 8531e78

Please sign in to comment.