Just a guess, but maybe tweaking the winrm params on the Windows machine might help:
https://blogs.technet.microsoft.com/heyscriptingguy/2013/07/30/learn-how-to-configure-powershell-memory/ J On Thursday, February 18, 2016 at 7:57:27 PM UTC-6, Kiran wrote: > > I have Ansible playbooks that can transfer files. I have Ansible > playbooks that can run small PowerShell scripts. But I cannot get an > Ansible playbook to run a long-running PowerShell script. The playbook > says it is successful when I run it on the Ansible Linux server. There is > no indication of failure. This script installs an .exe. It takes 20 > minutes to run. What is the trick to creating a timeout for an Ansible > playbook that kicks off a long-duration PowerShell script on a Windows > managed node? > > To kick off the script, I use the "raw" stanza in the playbook. I tried > the command module, but with open source Ansible 1.9, this module was > unavailable. I know this PowerShell script works because when I run it > manually, everything is fine. I'm not using Kerberos for authentication. > The Ansible user that is configured in the inventory file > (ansible_ssh_user) is a member of the Administrators group on the Windows > 2012 server. The account that I use to successfully start the PowerShell > script manually is a local administrator account. I suspect the long > duration is the problem. Short duration scripts run fine with Ansible > playbooks. > -- 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/31b402df-4773-4a3e-9067-a1e12925ca70%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
