mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #10897 from makinacorpus/return
salt.runner.jobs: optionnal toggle for output
This commit is contained in:
commit
7589f4bb26
@ -53,7 +53,7 @@ def active():
|
||||
return ret
|
||||
|
||||
|
||||
def lookup_jid(jid, ext_source=None):
|
||||
def lookup_jid(jid, ext_source=None, output=True):
|
||||
'''
|
||||
Return the printout from a previously executed job
|
||||
|
||||
@ -84,6 +84,7 @@ def lookup_jid(jid, ext_source=None):
|
||||
|
||||
for mid, data in client.get_full_returns(jid, [], 0).items():
|
||||
ret[mid] = data.get('ret')
|
||||
if output:
|
||||
salt.output.display_output(
|
||||
{mid: ret[mid]},
|
||||
data.get('out', None),
|
||||
|
Loading…
Reference in New Issue
Block a user