mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add stderr contents to parse errors
This commit is contained in:
parent
19f3cf45f4
commit
f3305564e2
1 changed files with 4 additions and 1 deletions
|
@ -236,7 +236,10 @@ class Runner(object):
|
||||||
if tmp.find("tmp") != -1 and C.DEFAULT_KEEP_REMOTE_FILES != '1':
|
if tmp.find("tmp") != -1 and C.DEFAULT_KEEP_REMOTE_FILES != '1':
|
||||||
cmd = cmd + "; rm -rf %s >/dev/null 2>&1" % tmp
|
cmd = cmd + "; rm -rf %s >/dev/null 2>&1" % tmp
|
||||||
res = self._low_level_exec_command(conn, cmd, tmp, sudoable=True)
|
res = self._low_level_exec_command(conn, cmd, tmp, sudoable=True)
|
||||||
return ReturnData(conn=conn, result=res['stdout'])
|
data = utils.parse_json(res['stdout'])
|
||||||
|
if 'parsed' in data and data['parsed'] == False:
|
||||||
|
data['msg'] += res['stderr']
|
||||||
|
return ReturnData(conn=conn, result=data)
|
||||||
|
|
||||||
# *****************************************************
|
# *****************************************************
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue