Merge pull request #7608 from jjneely/lookup-function

template.py: Handle purposely raised exceptions in lookup()
This commit is contained in:
Michael DeHaan 2014-05-30 22:24:53 -04:00
commit 959af67fe3

View file

@ -91,6 +91,9 @@ def lookup(name, *args, **kwargs):
# safely catch run failures per #5059
try:
ran = instance.run(*args, inject=vars, **kwargs)
except errors.AnsibleError:
# Plugin raised this on purpose
raise
except Exception, e:
ran = None
if ran: