mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
counter_enabled callback: honor display_ok_hosts setting (#11656)
* fix(callback/counter_enabled): honor display_ok_hosts setting * add changelog frag * Update changelogs/fragments/11656-counter_enabled-display_ok_hosts.yml
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- counter_enabled callback plugin - fix plugin not observing ``display_ok_hosts`` option (https://github.com/ansible-collections/community.general/issues/3978, https://github.com/ansible-collections/community.general/pull/11656).
|
||||
@@ -157,6 +157,8 @@ class CallbackModule(CallbackBase):
|
||||
msg = f"changed: {self._host_counter}/{self._host_total} [{result._host.get_name()}]"
|
||||
color = C.COLOR_CHANGED
|
||||
else:
|
||||
if not self._plugin_options.get("display_ok_hosts", True):
|
||||
return
|
||||
if delegated_vars:
|
||||
msg = f"ok: {self._host_counter}/{self._host_total} [{result._host.get_name()} -> {delegated_vars['ansible_host']}]"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user