diff --git a/lib/ohai/plugins/platform.rb b/lib/ohai/plugins/platform.rb index 0c8d63de7..5f36bc530 100644 --- a/lib/ohai/plugins/platform.rb +++ b/lib/ohai/plugins/platform.rb @@ -18,12 +18,24 @@ # Ohai.plugin(:Platform) do - provides "platform", "platform_version", "platform_family" + provides "platform", "platform_version", "platform_family", "platform_backend" depends "os", "os_version" collect_data(:default) do platform os unless attribute?("platform") platform_version os_version unless attribute?("platform_version") platform_family platform unless attribute?("platform_family") + + platform_backend Mash.new + platform_backend["type"] = "local" + platform_backend["uri"] = "local://" + + if connection + platform_backend["type"] = connection.backend_type + if connection.respond_to?(:uri) + platform_backend["type"] = connection.uri.split(":").first + platform_backend["uri"] = connection.uri + end + end end end