mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
162dd2594f
commit
d36394d6a6
4 changed files with 3 additions and 11 deletions
|
@ -544,8 +544,10 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||
if rc is None:
|
||||
rc = 0
|
||||
|
||||
display.debug("_low_level_execute_command() done: rc=%d, stdout=%s, stderr=%s" % (rc, stdout, stderr))
|
||||
# be sure to remove the BECOME-SUCCESS message now
|
||||
out = self._strip_success_message(out)
|
||||
|
||||
display.debug("_low_level_execute_command() done: rc=%d, stdout=%s, stderr=%s" % (rc, stdout, stderr))
|
||||
return dict(rc=rc, stdout=out, stdout_lines=out.splitlines(), stderr=err)
|
||||
|
||||
def _get_first_available_file(self, faf, of=None, searchdir='files'):
|
||||
|
|
|
@ -75,8 +75,4 @@ class ActionModule(ActionBase):
|
|||
|
||||
result['changed'] = True
|
||||
|
||||
# be sure to strip out the BECOME-SUCCESS message, which may
|
||||
# be there depending on the output of the module
|
||||
result['stdout'] = self._strip_success_message(result.get('stdout', ''))
|
||||
|
||||
return result
|
||||
|
|
|
@ -37,9 +37,4 @@ class ActionModule(ActionBase):
|
|||
executable = self._task.args.get('executable')
|
||||
result.update(self._low_level_execute_command(self._task.args.get('_raw_params'), executable=executable))
|
||||
|
||||
# for some modules (script, raw), the sudo success key
|
||||
# may leak into the stdout due to the way the sudo/su
|
||||
# command is constructed, so we filter that out here
|
||||
result['stdout'] = self._strip_success_message(result.get('stdout', ''))
|
||||
|
||||
return result
|
||||
|
|
|
@ -97,7 +97,6 @@ class ActionModule(ActionBase):
|
|||
if tmp and "tmp" in tmp and not C.DEFAULT_KEEP_REMOTE_FILES:
|
||||
self._remove_tmp_path(tmp)
|
||||
|
||||
result['stdout'] = self._strip_success_message(result.get('stdout', ''))
|
||||
result['changed'] = True
|
||||
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue