mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Fix saving of tracebacks on module failure
This commit is contained in:
parent
6b1b4e03b0
commit
fe278202f2
2 changed files with 7 additions and 8 deletions
|
@ -327,6 +327,6 @@ class ActionModule(ActionBase):
|
|||
if 'SyntaxError' in result.get('exception', result.get('msg', '')):
|
||||
# Emit a warning about using python3 because synchronize is
|
||||
# somewhat unique in running on localhost
|
||||
result['traceback'] = result['msg']
|
||||
result['exception'] = result['msg']
|
||||
result['msg'] = 'SyntaxError parsing module. Perhaps invoking "python" on your local (or delegate_to) machine invokes python3. You can set ansible_python_interpreter for localhost (or the delegate_to machine) to the location of python2 to fix this'
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue