Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
4cbfe3be
Commit
4cbfe3be
authored
Aug 06, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3773 from cchurch/devel
Update callbacks used for async tasks
parents
0b4e1457
6ba43311
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
lib/ansible/playbook/__init__.py
+4
-1
lib/ansible/runner/poller.py
+1
-1
No files found.
lib/ansible/playbook/__init__.py
View file @
4cbfe3be
...
...
@@ -277,7 +277,7 @@ class PlayBook(object):
# since these likely got killed by async_wrapper
for
host
in
poller
.
hosts_to_poll
:
reason
=
{
'failed'
:
1
,
'rc'
:
None
,
'msg'
:
'timed out'
}
self
.
runner_callbacks
.
on_
failed
(
host
,
reason
)
self
.
runner_callbacks
.
on_
async_failed
(
host
,
reason
,
poller
.
jid
)
results
[
'contacted'
][
host
]
=
reason
return
results
...
...
@@ -319,6 +319,9 @@ class PlayBook(object):
if
task
.
async_poll_interval
>
0
:
# if not polling, playbook requested fire and forget, so don't poll
results
=
self
.
_async_poll
(
poller
,
task
.
async_seconds
,
task
.
async_poll_interval
)
else
:
for
(
host
,
res
)
in
results
.
get
(
'contacted'
,
{})
.
iteritems
():
self
.
runner_callbacks
.
on_async_ok
(
host
,
res
,
poller
.
jid
)
contacted
=
results
.
get
(
'contacted'
,{})
dark
=
results
.
get
(
'dark'
,
{})
...
...
lib/ansible/runner/poller.py
View file @
4cbfe3be
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment