From c0ab417ef91b52a70bc5ac901fc5e124426ca8a0 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 3 Aug 2013 13:51:45 -0400 Subject: [PATCH] Don't iterate across strings in with_nested. --- lib/ansible/runner/lookup_plugins/nested.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/runner/lookup_plugins/nested.py b/lib/ansible/runner/lookup_plugins/nested.py index 66e6b2413f7..28775746efe 100644 --- a/lib/ansible/runner/lookup_plugins/nested.py +++ b/lib/ansible/runner/lookup_plugins/nested.py @@ -47,6 +47,8 @@ class LookupModule(object): for x in terms: if isinstance(x, basestring) and x in inject: results.append(inject[x]) + elif isinstance(x, basestring): + raise errors.AnsibleError("cannot resolve: %s" % x) else: results.append(x) return results