Method: QB::Ansible::Module#exit_json

Defined in:
lib/qb/ansible/module.rb

#exit_json(hash) ⇒ Object



486
487
488
489
490
491
492
# File 'lib/qb/ansible/module.rb', line 486

def exit_json hash
  # print JSON response to process' actual STDOUT (instead of $stdout,
  # which may be pointing to the qb parent process)
  STDOUT.print JSON.pretty_generate( hash.stringify_keys )
  
  exit true
end