From 245e0dd4b7095321bfe34d9f48844c856dbda15e Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 14 Aug 2015 18:07:14 -0400 Subject: [PATCH] made returns from next task consistent to avoid typeerrors, also linear now checks for none fixes #11965 --- lib/ansible/executor/play_iterator.py | 2 +- lib/ansible/plugins/strategies/linear.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/executor/play_iterator.py b/lib/ansible/executor/play_iterator.py index 1c5909122b..c6870e0224 100644 --- a/lib/ansible/executor/play_iterator.py +++ b/lib/ansible/executor/play_iterator.py @@ -130,7 +130,7 @@ class PlayIterator: task = None if s.run_state == self.ITERATING_COMPLETE: - return None + return (None, None) elif s.run_state == self.ITERATING_SETUP: s.run_state = self.ITERATING_TASKS s.pending_setup = True diff --git a/lib/ansible/plugins/strategies/linear.py b/lib/ansible/plugins/strategies/linear.py index 4b84884c6c..dd24b8bf0f 100644 --- a/lib/ansible/plugins/strategies/linear.py +++ b/lib/ansible/plugins/strategies/linear.py @@ -58,6 +58,9 @@ class StrategyModule(StrategyBase): continue (s, t) = v + if t is None: + continue + if s.cur_block < lowest_cur_block and s.run_state != PlayIterator.ITERATING_COMPLETE: lowest_cur_block = s.cur_block