mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
Make return invocation information so that our sanitized copy will take precedence over what the executor knows.
This commit is contained in:
parent
2936682f00
commit
d32a885e98
1 changed files with 4 additions and 1 deletions
|
@ -1431,7 +1431,6 @@ class AnsibleModule(object):
|
||||||
self.log(msg, log_args=log_args)
|
self.log(msg, log_args=log_args)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _set_cwd(self):
|
def _set_cwd(self):
|
||||||
try:
|
try:
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
|
@ -1524,6 +1523,8 @@ class AnsibleModule(object):
|
||||||
self.add_path_info(kwargs)
|
self.add_path_info(kwargs)
|
||||||
if not 'changed' in kwargs:
|
if not 'changed' in kwargs:
|
||||||
kwargs['changed'] = False
|
kwargs['changed'] = False
|
||||||
|
if 'invocation' not in kwargs:
|
||||||
|
kwargs['invocation'] = self.params
|
||||||
kwargs = remove_values(kwargs, self.no_log_values)
|
kwargs = remove_values(kwargs, self.no_log_values)
|
||||||
self.do_cleanup_files()
|
self.do_cleanup_files()
|
||||||
print(self.jsonify(kwargs))
|
print(self.jsonify(kwargs))
|
||||||
|
@ -1534,6 +1535,8 @@ class AnsibleModule(object):
|
||||||
self.add_path_info(kwargs)
|
self.add_path_info(kwargs)
|
||||||
assert 'msg' in kwargs, "implementation error -- msg to explain the error is required"
|
assert 'msg' in kwargs, "implementation error -- msg to explain the error is required"
|
||||||
kwargs['failed'] = True
|
kwargs['failed'] = True
|
||||||
|
if 'invocation' not in kwargs:
|
||||||
|
kwargs['invocation'] = self.params
|
||||||
kwargs = remove_values(kwargs, self.no_log_values)
|
kwargs = remove_values(kwargs, self.no_log_values)
|
||||||
self.do_cleanup_files()
|
self.do_cleanup_files()
|
||||||
print(self.jsonify(kwargs))
|
print(self.jsonify(kwargs))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue