mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Introduce exception AnsibleFilterError and use it in Jinja filters. Ignore this exception when trying to find the name of a task for display (callback) purpose.
This commit is contained in:
@@ -33,7 +33,7 @@ def to_nice_json(*a, **kw):
|
||||
def failed(*a, **kw):
|
||||
item = a[0]
|
||||
if type(item) != dict:
|
||||
raise errors.AnsibleError("|failed expects a dictionary")
|
||||
raise errors.AnsibleFilterError("|failed expects a dictionary")
|
||||
rc = item.get('rc',0)
|
||||
failed = item.get('failed',False)
|
||||
if rc != 0 or failed:
|
||||
|
||||
Reference in New Issue
Block a user