How can I get task name in runner_on_ok callback?
The task should be exposed to your callback plugin as self.task. This is set using ansible.callbacks.set_task
self.task should have an attribute of ‘name’, so I imagine something like self.task.name would give you what you are looking for.
Thank you , it worked.