If failed lookups are fatal, re-raise the exception

Fixes #1938.
parent e166f71f
......@@ -170,6 +170,8 @@ def _varFind(basedir, text, vars, lookup_fatal, depth=0):
except errors.AnsibleError:
if not lookup_fatal:
replacement = None
else:
raise
else:
replacement = None
return {'replacement': replacement, 'start': start, 'end': end}
......
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