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
78bdb078
Commit
78bdb078
authored
Mar 26, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug related to async jid polling change plus a new test
parent
88462729
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
lib/ansible/playbook/__init__.py
+2
-2
test/integration/roles/test_async/tasks/main.yml
+14
-0
No files found.
lib/ansible/playbook/__init__.py
View file @
78bdb078
...
@@ -304,7 +304,7 @@ class PlayBook(object):
...
@@ -304,7 +304,7 @@ class PlayBook(object):
# since these likely got killed by async_wrapper
# since these likely got killed by async_wrapper
for
host
in
poller
.
hosts_to_poll
:
for
host
in
poller
.
hosts_to_poll
:
reason
=
{
'failed'
:
1
,
'rc'
:
None
,
'msg'
:
'timed out'
}
reason
=
{
'failed'
:
1
,
'rc'
:
None
,
'msg'
:
'timed out'
}
self
.
runner_callbacks
.
on_async_failed
(
host
,
reason
,
poller
.
jid
)
self
.
runner_callbacks
.
on_async_failed
(
host
,
reason
,
poller
.
runner
.
setup_cache
[
host
][
'ansible_job_id'
]
)
results
[
'contacted'
][
host
]
=
reason
results
[
'contacted'
][
host
]
=
reason
return
results
return
results
...
@@ -375,7 +375,7 @@ class PlayBook(object):
...
@@ -375,7 +375,7 @@ class PlayBook(object):
results
=
self
.
_async_poll
(
poller
,
task
.
async_seconds
,
task
.
async_poll_interval
)
results
=
self
.
_async_poll
(
poller
,
task
.
async_seconds
,
task
.
async_poll_interval
)
else
:
else
:
for
(
host
,
res
)
in
results
.
get
(
'contacted'
,
{})
.
iteritems
():
for
(
host
,
res
)
in
results
.
get
(
'contacted'
,
{})
.
iteritems
():
self
.
runner_callbacks
.
on_async_ok
(
host
,
res
,
poller
.
jid
)
self
.
runner_callbacks
.
on_async_ok
(
host
,
res
,
poller
.
runner
.
setup_cache
[
host
][
'ansible_job_id'
]
)
contacted
=
results
.
get
(
'contacted'
,{})
contacted
=
results
.
get
(
'contacted'
,{})
dark
=
results
.
get
(
'dark'
,
{})
dark
=
results
.
get
(
'dark'
,
{})
...
...
test/integration/roles/test_async/tasks/main.yml
View file @
78bdb078
...
@@ -43,3 +43,17 @@
...
@@ -43,3 +43,17 @@
-
"
'stdout_lines'
in
async_result"
-
"
'stdout_lines'
in
async_result"
-
"
async_result.rc
==
0"
-
"
async_result.rc
==
0"
-
name
:
test async without polling
command
:
sleep 5
async
:
30
poll
:
0
register
:
async_result
-
debug
:
var=async_result
-
name
:
validate async without polling returns
assert
:
that
:
-
"
'ansible_job_id'
in
async_result"
-
"
'started'
in
async_result"
-
"
'finished'
not
in
async_result"
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