1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-07-09 03:58:59 +00:00

counter_enabled callback: display output for looped tasks (#12067)

* fix(counter_enabled): display output for looped tasks with delegate_to

Implement v2_runner_item_on_ok, v2_runner_item_on_failed, and
v2_runner_item_on_skipped so that looped tasks (including those
using delegate_to: localhost) produce visible output.

Also extract _host_label, _display_result_ok, _display_result_failed,
and _display_result_skipped helpers to eliminate repeated delegation
and message-building logic across the callback methods.

Fixes #8187

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* changelog(counter_enabled): add fragment for PR #12067

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(counter_enabled): add integration tests, adjust _host_label

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(counter_enabled): migrate integration tests to callback test framework

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(counter_enabled): fix integration tests to use set_fact instead of debug

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexei Znamensky 2026-06-14 03:01:50 +12:00 committed by GitHub
parent 9c0051e325
commit f677c2ab7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 165 additions and 56 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- counter_enabled callback - fix missing output for looped tasks, including tasks using ``delegate_to`` (https://github.com/ansible-collections/community.general/issues/8187, https://github.com/ansible-collections/community.general/pull/12067).