mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
selective: mark task failed correctly (#629)
Added additional condition to detect failed task in selective callback plugin when ran with loop or with_items. Fixes: ansible/ansible#63767 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
b31de003bd
commit
151551b04f
2 changed files with 3 additions and 1 deletions
|
@ -201,7 +201,7 @@ class CallbackModule(CallbackBase):
|
|||
)
|
||||
if 'results' in result._result:
|
||||
for r in result._result['results']:
|
||||
failed = 'failed' in r
|
||||
failed = 'failed' in r and r['failed']
|
||||
|
||||
stderr = [r.get('exception', None), r.get('module_stderr', None)]
|
||||
stderr = "\n".join([e for e in stderr if e]).strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue