mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-21 16:39:08 -07: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:
parent
15303b05ef
commit
e9f9bcae6a
3 changed files with 19 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue