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

Merge pull request #11609 from ofpiyush/devel

Fix #11369 A result is skipped when all it's children are skipped. Th…
This commit is contained in:
James Cammarata 2015-07-16 11:45:04 -04:00
commit d977dd507c

View file

@ -40,7 +40,14 @@ class TaskResult:
return self._check_key('changed')
def is_skipped(self):
return self._check_key('skipped')
if 'results' in self._result:
flag = True
for res in self._result.get('results', []):
if isinstance(res, dict):
flag &= res.get('skipped', False)
return flag
else:
return self._result.get('skipped', False)
def is_failed(self):
if 'failed_when_result' in self._result or \