mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Merge pull request #3462 from stoned/filtererror
Introduce exception AnsibleFilterError and use it in Jinja filters. Ign...
This commit is contained in:
commit
0f4229f6c4
4 changed files with 43 additions and 34 deletions
|
@ -34,7 +34,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue