Thank you for you answer.
I already know *post_tasks*, *handlers*, and *ansible-runner*, but I
don't think there are good for what I'm looking for.
You need a bit more context: I have a custom lookup plugin that
initialize some data and execute a new process in order to keep these
datas available during the playbook life.
I want to be able to send a SIGTERM signal to the process to terminate
it at the end of playbook execution.
As I want to share this custom plugin, I don't want any user
interaction, because it's not the user role to worry about this extra
process.
So *post_tasks*, *handlers*, and *wait_for* are excluded.
*ansible-runner* may be a good alternative but I don't want to force
users to use *ansible-runner* instead of *ansible*.
I hope it's more clear.
Regards,
Daniel