1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Make sure we're actually looping before looking at 'results' in TaskResult

Fixes #11696
This commit is contained in:
James Cammarata 2015-07-24 11:55:22 -04:00
parent 0fcd53e887
commit ff49c5adac

View file

@ -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):