mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +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,7 +84,8 @@ def lookup_jid(jid, ext_source=None):
|
||||
|
||||
for mid, data in client.get_full_returns(jid, [], 0).items():
|
||||
ret[mid] = data.get('ret')
|
||||
salt.output.display_output(
|
||||
if output:
|
||||
salt.output.display_output(
|
||||
{mid: ret[mid]},
|
||||
data.get('out', None),
|
||||
__opts__)
|
||||
|
Loading…
Reference in New Issue
Block a user