mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Don't raise AnsibleConnectionFailure if the ssh process has already died. (#53534)
* Don't raise AnsibleConnectionFailure if the ssh_process has already died. Fixes #53487 * Better support for file not found messages * Add changelog fragment
This commit is contained in:
@@ -975,8 +975,8 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
||||
|
||||
# try to figure out if we are missing interpreter
|
||||
if self._used_interpreter is not None:
|
||||
match = '%s: No such file or directory' % self._used_interpreter.lstrip('!#')
|
||||
if match in data['module_stderr'] or match in data['module_stdout']:
|
||||
match = re.compile('%s: (?:No such file or directory|not found)' % self._used_interpreter.lstrip('!#'))
|
||||
if match.search(data['module_stderr']) or match.search(data['module_stdout']):
|
||||
data['msg'] = "The module failed to execute correctly, you probably need to set the interpreter."
|
||||
|
||||
# always append hint
|
||||
|
||||
Reference in New Issue
Block a user