Merge pull request #7608 from jjneely/lookup-function

template.py: Handle purposely raised exceptions in lookup()
pull/7278/merge
Michael DeHaan 11 years ago
commit 959af67fe3

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

Loading…
Cancel
Save