1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

selective: don't hard code ansible_loop_var 'item' (#10752)

* selective: don't hard code ansible_loop_var 'item'

* Add changelog fragment

* Update changelog message

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Hoang Nguyen 2025-08-29 04:32:15 +00:00 committed by GitHub
parent d6ad9beb58
commit f6003f61cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -208,7 +208,7 @@ class CallbackModule(CallbackBase):
stderr = [r.get('exception', None), r.get('module_stderr', None)]
stderr = "\n".join([e for e in stderr if e]).strip()
self._print_host_or_item(r['item'],
self._print_host_or_item(r[r['ansible_loop_var']],
r.get('changed', False),
to_text(r.get('msg', '')),
r.get('diff', None),