diff options
author | Wade Peacock <wade.peacock@visioncritical.com> | 2021-05-20 19:19:10 -0700 |
---|---|---|
committer | Wade Peacock <wade.peacock@visioncritical.com> | 2021-05-20 19:27:16 -0700 |
commit | 6ca8519cc204912937676dc223384787dde6aab7 (patch) | |
tree | ea27d4a76e453c7198cbf745cb7cb2772f4df6fd | |
parent | 934109b9eb3d46da996eb4780719e0ebe11ccafc (diff) | |
download | ohai-6ca8519cc204912937676dc223384787dde6aab7.tar.gz |
ohai/plugins/packages.rb - order change - impact chef16/17
Change order of collect_programs_from_registry_key
move collection of Wos6432Node before HKEY_CURRENT_USER
When located last, ohai packages does not report Wow6432 software
Found when updating from Chef 15 to Chef 16
Signed-off-by: Wade Peacock <knightorc@xqqme.com>
-rw-r--r-- | lib/ohai/plugins/packages.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/plugins/packages.rb b/lib/ohai/plugins/packages.rb index 33591792..e9e74909 100644 --- a/lib/ohai/plugins/packages.rb +++ b/lib/ohai/plugins/packages.rb @@ -134,9 +134,9 @@ Ohai.plugin(:Packages) do require "win32/registry" unless defined?(Win32::Registry) packages Mash.new collect_programs_from_registry_key(Win32::Registry::HKEY_LOCAL_MACHINE, 'Software\Microsoft\Windows\CurrentVersion\Uninstall') - collect_programs_from_registry_key(Win32::Registry::HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Uninstall') + # on 64 bit systems, 32 bit programs are stored here moved before HKEY_CURRENT_USER otherwise it is not collected (impacts both ohai 16 & 17) collect_programs_from_registry_key(Win32::Registry::HKEY_LOCAL_MACHINE, 'Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall') - # on 64 bit systems, 32 bit programs are stored here + collect_programs_from_registry_key(Win32::Registry::HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Uninstall') end collect_data(:aix) do |