Catch all exceptions coming from lookup plugins

Fixes using $TEMPLATE() and hostvars in a task without a name, among
other things.
pull/2212/head
Daniel Hokka Zakrisson 12 years ago
parent b1a4fab7e1
commit bcf7a2c53a

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

Loading…
Cancel
Save