mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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
2
changelogs/fragments/63767_selective.yml
Normal file
2
changelogs/fragments/63767_selective.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- selective - mark task failed correctly (https://github.com/ansible/ansible/issues/63767).
|
|
@ -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…
Reference in a new issue