diff options
author | Tim Smith <tsmith@chef.io> | 2021-10-08 10:46:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 10:46:21 -0700 |
commit | efbeece947786b994ae8f55d58062f9e333e3193 (patch) | |
tree | c34df612001582a14bbd549168f613184aa12901 | |
parent | e06c0f80ef0ce533b45fe86d5205e5e3a30cbd0d (diff) | |
parent | f65a21cc7e6f4cf9f54e50f170deec549e78f0dd (diff) | |
download | ohai-efbeece947786b994ae8f55d58062f9e333e3193.tar.gz |
Merge pull request #1698 from tecracer-theinen/fix/remote-ohai
Fix handling of remote targets for Ohai
-rw-r--r-- | lib/ohai/mixin/os.rb | 4 | ||||
-rw-r--r-- | lib/ohai/plugins/os.rb | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/ohai/mixin/os.rb b/lib/ohai/mixin/os.rb index 00837092..44d3686f 100644 --- a/lib/ohai/mixin/os.rb +++ b/lib/ohai/mixin/os.rb @@ -82,13 +82,13 @@ module Ohai else # now we have something like an IPMI console that isn't Unix-like or Windows, presumably cannot run ruby, and # so we just trust the train O/S information. - transport_connection.os + transport_connection.os.name end end # @api private def nonruby_target? - transport_connection && !transport_connection.os.unix? && !transport_connection.os.windows + transport_connection && !transport_connection.os.unix? && !transport_connection.os.windows? end # @api private diff --git a/lib/ohai/plugins/os.rb b/lib/ohai/plugins/os.rb index 21d825a6..aa78ab26 100644 --- a/lib/ohai/plugins/os.rb +++ b/lib/ohai/plugins/os.rb @@ -40,6 +40,12 @@ Ohai.plugin(:OS) do collect_data(:target) do os collect_os + os_version "unknown" + end + + collect_data(:api) do + os collect_os + os_version "unknown" end collect_data do |