I have Ansible on CentOS. I have some Windows 2012 Servers that get PowerShell scripts pushed down. Various PowerShell scripts can be ran if they don’t take much time. One PowerShell script runs an installer process. There are 18 things that are installed. As a manual process, the PowerShell script works when kicked off by a local administrator. When an Ansible playbook initiates the script, only one component is installed. From the Ansible server, the playbook run is sucessful. The script does need 20 minutes to run. The ansible_ssh_user that is configured in the inventory file is a local administrator. So I don’t think the permissions of the account could be the root cause.
Is there a way to run a PowerShell script asynchronously? Maybe the problem is not a timeout issue. I run the PowerShell script via the Playbook’s “raw” module. This module does not support the “async” directive. The lack of an error message and the partial success are proving difficult to troubleshoot. What should I do?