Sha256: 8399e22f9fc8958f56ffef867685e5d887ae68711dc71ec274f460a478be1777

Contents?: true

Size: 394 Bytes

Versions: 83

Compression:

Stored size: 394 Bytes

Contents

module Specinfra
  class HostInventory
    class Ohai < Base
      def get
        begin
          require 'json'
        rescue LoadError
          return nil
        end

        begin
          ret = backend.run_command('ohai --log_level error')
        rescue StandardError
          nil
        end

        ret.exit_status.zero? ? JSON.parse(ret.stdout) : nil
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.90.1 lib/specinfra/host_inventory/ohai.rb
specinfra-2.90.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.89.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.88.2 lib/specinfra/host_inventory/ohai.rb
specinfra-2.88.1 lib/specinfra/host_inventory/ohai.rb
specinfra-2.88.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.87.2 lib/specinfra/host_inventory/ohai.rb
specinfra-2.87.1 lib/specinfra/host_inventory/ohai.rb
specinfra-2.87.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.86.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.85.1 lib/specinfra/host_inventory/ohai.rb
specinfra-2.85.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.84.1 lib/specinfra/host_inventory/ohai.rb
specinfra-2.84.0 lib/specinfra/host_inventory/ohai.rb
specinfra-2.83.4 lib/specinfra/host_inventory/ohai.rb
specinfra-2.83.3 lib/specinfra/host_inventory/ohai.rb
specinfra-2.83.2 lib/specinfra/host_inventory/ohai.rb
specinfra-2.83.1 lib/specinfra/host_inventory/ohai.rb
specinfra-2.83.0 lib/specinfra/host_inventory/ohai.rb