diff options
author | Adam Edwards <adamed@opscode.com> | 2015-10-17 22:59:42 -0700 |
---|---|---|
committer | Adam Edwards <adamed@opscode.com> | 2015-10-17 22:59:42 -0700 |
commit | f4f426d712f8ce50a4a79651cac62fe666924635 (patch) | |
tree | eaf39c99646d0b34ca9474e0099e1701b22ef750 | |
parent | 081589066eefa00a60192f8cac8801e3b2b31bfe (diff) | |
download | ohai-adamedx/ohai-no-pnp.tar.gz |
Disable drivers plugin on Windows by default to improve performanceadamedx/ohai-no-pnp
-rw-r--r-- | lib/ohai/plugins/windows/drivers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ohai/plugins/windows/drivers.rb b/lib/ohai/plugins/windows/drivers.rb index 13d43b72..2204c1e4 100644 --- a/lib/ohai/plugins/windows/drivers.rb +++ b/lib/ohai/plugins/windows/drivers.rb @@ -20,6 +20,11 @@ Ohai.plugin(:Drivers) do depends "kernel" collect_data(:windows) do + if ! hint?('win32_pnp_signed_driver') + Ohai::Log.debug("Skipping Win32_PnpSignedDriver in absence of `win32_pnp_signed_driver` hint") + return + end + require 'wmi-lite/wmi' wmi = WmiLite::Wmi.new |