From ff49c5adac81491b16b31dda6209d6482ae15a71 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Fri, 24 Jul 2015 11:55:22 -0400 Subject: [PATCH] Make sure we're actually looping before looking at 'results' in TaskResult Fixes #11696 --- lib/ansible/executor/task_result.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/executor/task_result.py b/lib/ansible/executor/task_result.py index d633f20736..d87f9413ef 100644 --- a/lib/ansible/executor/task_result.py +++ b/lib/ansible/executor/task_result.py @@ -40,7 +40,7 @@ class TaskResult: return self._check_key('changed') def is_skipped(self): - if 'results' in self._result: + if 'results' in self._result and self._task.loop: flag = True for res in self._result.get('results', []): if isinstance(res, dict): @@ -60,7 +60,7 @@ class TaskResult: return self._check_key('unreachable') def _check_key(self, key): - if 'results' in self._result: + if 'results' in self._result and self._task.loop: flag = False for res in self._result.get('results', []): if isinstance(res, dict):