Skip to content

Commit

Permalink
wait_for_connection returning unreachable when ignore_unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
goshansp committed Apr 17, 2021
1 parent 9ba6cf9 commit 02a12f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ansible/plugins/action/wait_for_connection.py
Expand Up @@ -108,7 +108,11 @@ def ping_module_test(connect_timeout):
self.do_until_success_or_timeout(ping_module_test, timeout, connect_timeout, what_desc="ping module test", sleep=sleep)

except TimedOutException as e:
result['failed'] = True
task_fields = self._task.dump_attrs()
if task_fields.get('ignore_unreachable'):
result['unreachable'] = True
else:
result['failed'] = True
result['msg'] = to_text(e)

elapsed = datetime.now() - start
Expand Down

0 comments on commit 02a12f9

Please sign in to comment.