ansible-runner icon indicating copy to clipboard operation
ansible-runner copied to clipboard

Added more information about tasks to event_data #1227

Open NaincyKumariKnoldus opened this issue 1 year ago • 2 comments

Hi!! I have updated /ansible_runner/display_callback/callback/awx_display.py. Added more information about tasks to event_data as you have mentioned.

task_ctx = dict( task=(task.name or task.action), task_uuid=str(task._uuid), task_action=task.action, task_check_mode=task.check_mode, resolved_action=getattr(task, 'resolved_action', task.action), task_args='', )

Please review this PR and merge it. If any changes still required please do let me know.

Thanks! #1227

NaincyKumariKnoldus avatar Apr 14 '23 11:04 NaincyKumariKnoldus

Given that most tasks aren't in check mode most of the time, maybe this key should only be added if the task is in check mode and callers can assume its absence as False. Otherwise this further bloats up the already quite-large event payloads with data that most people don't need.

nitzmahone avatar Apr 14 '23 18:04 nitzmahone

@NaincyKumariKnoldus Thanks for the PR. Could you please address @nitzmahone's review and also add a test for this change? Thanks,

Akasurde avatar Apr 17 '23 14:04 Akasurde