Merge pull request #7608 from jjneely/lookup-function
template.py: Handle purposely raised exceptions in lookup()
This commit is contained in:
commit
959af67fe3
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue