From dfcf6a2016f7ba34dd06b9dafe3a0fbc653f1cde Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 22 Jul 2015 15:55:11 -0400 Subject: [PATCH] Skip hosts with no state while iterating tasks in the linear strategy Fixes #11693 --- lib/ansible/plugins/strategies/linear.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/strategies/linear.py b/lib/ansible/plugins/strategies/linear.py index b35df337ba0..d5d260aa963 100644 --- a/lib/ansible/plugins/strategies/linear.py +++ b/lib/ansible/plugins/strategies/linear.py @@ -82,7 +82,10 @@ class StrategyModule(StrategyBase): # specified in the given hosts array rvals = [] for host in hosts: - (s, t) = host_tasks[host.name] + host_state_task = host_tasks[host.name] + if host_state_task is None: + continue + (s, t) = host_state_task if s.run_state == cur_state and s.cur_block == cur_block: new_t = iterator.get_next_task_for_host(host) #if new_t != t: