Class: Specinfra::HostInventory::Facter

Inherits:
Base
  • Object
show all
Defined in:
lib/specinfra/host_inventory/facter.rb

Instance Method Summary collapse

Methods inherited from Base

#backend, #initialize

Constructor Details

This class inherits a constructor from Specinfra::HostInventory::Base

Instance Method Details

#getObject



6
7
8
9
10
11
12
13
14
# File 'lib/specinfra/host_inventory/facter.rb', line 6

def get
  begin
    ret = backend.run_command('facter --puppet --yaml')
  rescue StandardError
    nil
  end

  ret.exit_status.zero? ? YAML.load(ret.stdout) : nil
end