mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Correctly check for failed status from an async task. Use runner_on_async_failed callback (instead of runner_on_failed) when an async task times out. Add runner_on_async_ok callback when a task is started in fire and forget mode.
This commit is contained in:
parent
5f18a53530
commit
6ba4331161
2 changed files with 5 additions and 2 deletions
|
@ -73,7 +73,7 @@ class AsyncPoller(object):
|
|||
else:
|
||||
self.results['contacted'][host] = res
|
||||
poll_results['contacted'][host] = res
|
||||
if 'failed' in res:
|
||||
if res.get('failed', False) or res.get('rc', 0) != 0:
|
||||
self.runner.callbacks.on_async_failed(host, res, self.jid)
|
||||
else:
|
||||
self.runner.callbacks.on_async_ok(host, res, self.jid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue