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
614c626e
Commit
614c626e
authored
Jul 07, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix no hosts remaining logic in linear strategy
parent
135fa41e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
lib/ansible/plugins/strategies/linear.py
+8
-7
No files found.
lib/ansible/plugins/strategies/linear.py
View file @
614c626e
...
...
@@ -130,14 +130,8 @@ class StrategyModule(StrategyBase):
try
:
debug
(
"getting the remaining hosts for this loop"
)
self
.
_tqm
.
_failed_hosts
=
iterator
.
get_failed_hosts
()
hosts_left
=
self
.
get_hosts_remaining
(
iterator
.
_play
)
hosts_left
=
self
.
_inventory
.
get_hosts
(
iterator
.
_play
.
hosts
)
debug
(
"done getting the remaining hosts for this loop"
)
if
len
(
hosts_left
)
==
0
:
debug
(
"out of hosts to run on"
)
self
.
_tqm
.
send_callback
(
'v2_playbook_on_no_hosts_remaining'
)
result
=
False
break
# queue up this task for each host in the inventory
callback_sent
=
False
...
...
@@ -145,6 +139,7 @@ class StrategyModule(StrategyBase):
host_results
=
[]
host_tasks
=
self
.
_get_next_task_lockstep
(
hosts_left
,
iterator
)
for
(
host
,
task
)
in
host_tasks
:
if
not
task
:
continue
...
...
@@ -208,6 +203,12 @@ class StrategyModule(StrategyBase):
if
run_once
:
break
if
not
work_to_do
:
debug
(
"out of hosts to run on"
)
self
.
_tqm
.
send_callback
(
'v2_playbook_on_no_hosts_remaining'
)
result
=
False
break
debug
(
"done queuing things up, now waiting for results queue to drain"
)
results
=
self
.
_wait_on_pending_results
(
iterator
)
host_results
.
extend
(
results
)
...
...
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