Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.9] selective callback: mark task failed correctly #70581

Merged
merged 1 commit into from Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/63767_selective_callback.yml
@@ -0,0 +1,2 @@
bugfixes:
- selective callback - mark task failed correctly (https://github.com/ansible/ansible/issues/63767).
2 changes: 1 addition & 1 deletion lib/ansible/plugins/callback/selective.py
Expand Up @@ -202,7 +202,7 @@ def _print_task_result(self, result, error=False, **kwargs):
)
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()
Expand Down