wait_for_connection: also retry interpreter discovery (#67040)
self._discovered_interpreter_key is None unless a previous iteration has attempted discovery. In that case, force re-discovery, as the previous attempt certainly failed.
This commit is contained in:
parent
f4a80bb600
commit
fd954a9c5c
2 changed files with 7 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
bugfixes:
|
||||
- wait_for_connection - with pipelining enabled, interpreter discovery would
|
||||
fail if the first connection attempt was not successful
|
|
@ -79,6 +79,9 @@ class ActionModule(ActionBase):
|
|||
def ping_module_test(connect_timeout):
|
||||
''' Test ping module, if available '''
|
||||
display.vvv("wait_for_connection: attempting ping module test")
|
||||
# re-run interpreter discovery if we ran it in the first iteration
|
||||
if self._discovered_interpreter_key:
|
||||
task_vars['ansible_facts'].pop(self._discovered_interpreter_key, None)
|
||||
# call connection reset between runs if it's there
|
||||
try:
|
||||
self._connection.reset()
|
||||
|
|
Loading…
Add table
Reference in a new issue