Catch all exceptions coming from lookup plugins

Fixes using $TEMPLATE() and hostvars in a task without a name, among
other things.
parent b1a4fab7
......@@ -175,7 +175,7 @@ def _varFind(basedir, text, vars, lookup_fatal, depth, expand_lists):
replacement = instance.run(args, inject=vars)
if expand_lists:
replacement = u",".join([unicode(x) for x in replacement])
except errors.AnsibleError:
except:
if not lookup_fatal:
replacement = None
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment