mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-21 16:21:12 +00:00
Merge pull request #7608 from jjneely/lookup-function
template.py: Handle purposely raised exceptions in lookup()
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user