From 20785187356d308d9d9047dc1695c2e911ef03ec Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 9 Oct 2013 15:55:32 -0400 Subject: [PATCH] Allow subelements to work right with skipped results. --- lib/ansible/runner/lookup_plugins/subelements.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/runner/lookup_plugins/subelements.py b/lib/ansible/runner/lookup_plugins/subelements.py index 31e7ba9d2e..fef0f05575 100644 --- a/lib/ansible/runner/lookup_plugins/subelements.py +++ b/lib/ansible/runner/lookup_plugins/subelements.py @@ -38,6 +38,8 @@ class LookupModule(object): "subelements lookup expects a list of two items, first a dict or a list, and second a string") if isinstance(terms[0], dict): # convert to list: + if terms[0].get('skipped',False) != False: + return [] elementlist = [] for key in terms[0].iterkeys(): elementlist.append(terms[0][key])