Have a look at the async docs https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html. You want to use the async keyword and set ‘poll: 0’ as task directives.
As I said though, async is not the right tool for what you are looking for. You should be using a scheduled task or Windows service to run this. Using async will have lots of issues as; * You can not run an async task indefinitely, you must set a max timeout value for each async task that Ansible spawns * If the process ends abruptly, you need to use Ansible to start the task again, scheduled tasks and services can have more thourough error handling and can even restart the service if you want * adding to the above, Ansible is on a separate host if you need to restart the process a service/task can be controlled using PowerShell on that same host * You have limited visibility over the process apart from seeing if it is still running by checking all the currently running processes Do this the right way now or else you will regret it in the future. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b3572933-9795-4322-9984-c55db818b8bc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
