ansible_connection for Windows apart from winrm

49 views
Skip to first unread message

utkarsh srivastava

unread,
Apr 20, 2018, 6:44:12 AM4/20/18
to Ansible Project
Hi,

I want to run a very long process on windows machine through ansible. I want to trigger this process in background.
But wirnrm does not allow me to do this. it got stuck till that process not completed.
I could not use win_nssm module, because i don't want to create service. and also i could not use win_scheduled_task because i want to know process ID instantly.

Can anyone suggest what else i use instead of winrm module, or any other solution with winrm module.


Thanks for your help

Jordan Borean

unread,
Apr 20, 2018, 7:43:43 AM4/20/18
to Ansible Project
What you want to do is possible but in reality you really don’t want to do it. This is the entire point of services and/or scheduled tasks which have arguably better error control and process handling than a detached process that you have to do with WinRM. If you are still interested you can start an async task with poll 0 and a really long async timeout value or spawn the detached process manually with WMI and Win32_Process but as I said you probably don’t want to do this in the long run.

Thanks

Jordan
Reply all
Reply to author
Forward
0 new messages