diff options
author | Thomas Heinen <theinen@tecracer.de> | 2021-10-08 08:36:29 +0000 |
---|---|---|
committer | Thomas Heinen <theinen@tecracer.de> | 2021-10-08 10:36:52 +0200 |
commit | f65a21cc7e6f4cf9f54e50f170deec549e78f0dd (patch) | |
tree | c34df612001582a14bbd549168f613184aa12901 /lib | |
parent | e06c0f80ef0ce533b45fe86d5205e5e3a30cbd0d (diff) | |
download | ohai-f65a21cc7e6f4cf9f54e50f170deec549e78f0dd.tar.gz |
Fix handling of remote targets for Ohai
Signed-off-by: Thomas Heinen <theinen@tecracer.de>
Diffstat (limited to 'lib')
-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 |