mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Merge branch 'hfinucane-gh-7432' into devel
This commit is contained in:
@@ -415,7 +415,8 @@ class CliRunnerCallbacks(DefaultRunnerCallbacks):
|
|||||||
super(CliRunnerCallbacks, self).on_async_poll(host, res, jid, clock)
|
super(CliRunnerCallbacks, self).on_async_poll(host, res, jid, clock)
|
||||||
|
|
||||||
def on_async_ok(self, host, res, jid):
|
def on_async_ok(self, host, res, jid):
|
||||||
display("<job %s> finished on %s => %s"%(jid, host, utils.jsonify(res,format=True)), runner=self.runner)
|
if jid:
|
||||||
|
display("<job %s> finished on %s => %s"%(jid, host, utils.jsonify(res,format=True)), runner=self.runner)
|
||||||
super(CliRunnerCallbacks, self).on_async_ok(host, res, jid)
|
super(CliRunnerCallbacks, self).on_async_ok(host, res, jid)
|
||||||
|
|
||||||
def on_async_failed(self, host, res, jid):
|
def on_async_failed(self, host, res, jid):
|
||||||
@@ -568,8 +569,9 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
|
|||||||
super(PlaybookRunnerCallbacks, self).on_async_poll(host,res,jid,clock)
|
super(PlaybookRunnerCallbacks, self).on_async_poll(host,res,jid,clock)
|
||||||
|
|
||||||
def on_async_ok(self, host, res, jid):
|
def on_async_ok(self, host, res, jid):
|
||||||
msg = "<job %s> finished on %s"%(jid, host)
|
if jid:
|
||||||
display(msg, color='cyan', runner=self.runner)
|
msg = "<job %s> finished on %s"%(jid, host)
|
||||||
|
display(msg, color='cyan', runner=self.runner)
|
||||||
super(PlaybookRunnerCallbacks, self).on_async_ok(host, res, jid)
|
super(PlaybookRunnerCallbacks, self).on_async_ok(host, res, jid)
|
||||||
|
|
||||||
def on_async_failed(self, host, res, jid):
|
def on_async_failed(self, host, res, jid):
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ class AsyncPoller(object):
|
|||||||
self.active = True
|
self.active = True
|
||||||
else:
|
else:
|
||||||
skipped = skipped and res.get('skipped', False)
|
skipped = skipped and res.get('skipped', False)
|
||||||
|
self.runner.vars_cache[host]['ansible_job_id'] = ''
|
||||||
self.results['contacted'][host] = res
|
self.results['contacted'][host] = res
|
||||||
for (host, res) in results['dark'].iteritems():
|
for (host, res) in results['dark'].iteritems():
|
||||||
self.runner.vars_cache[host]['ansible_job_id'] = ''
|
self.runner.vars_cache[host]['ansible_job_id'] = ''
|
||||||
|
|||||||
@@ -56,3 +56,9 @@
|
|||||||
- "'ansible_job_id' in async_result"
|
- "'ansible_job_id' in async_result"
|
||||||
- "'started' in async_result"
|
- "'started' in async_result"
|
||||||
- "'finished' not in async_result"
|
- "'finished' not in async_result"
|
||||||
|
|
||||||
|
- name: test skipped task handling
|
||||||
|
command: /bin/true
|
||||||
|
async: 15
|
||||||
|
poll: 0
|
||||||
|
when: False
|
||||||
|
|||||||
Reference in New Issue
Block a user