# How do I extend the timeout value for long-duration playbooks ran against Windows servers?

**URL:** <https://forum.ansible.com/t/how-do-i-extend-the-timeout-value-for-long-duration-playbooks-ran-against-windows-servers/20624>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 19, 2016, 1:57am UTC](https://forum.ansible.com/t/how-do-i-extend-the-timeout-value-for-long-duration-playbooks-ran-against-windows-servers/20624 "2016-02-19T01:57:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kiran1](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@Kiran1](https://forum.ansible.com/u/Kiran1)\
**Post date:** [February 19, 2016, 1:57am UTC](https://forum.ansible.com/t/how-do-i-extend-the-timeout-value-for-long-duration-playbooks-ran-against-windows-servers/20624/1 "2016-02-19T01:57:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jason\_Levitt](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jason\_Levitt](https://forum.ansible.com/u/Jason_Levitt)\
**Post date:** [February 19, 2016, 8:47pm UTC](https://forum.ansible.com/t/how-do-i-extend-the-timeout-value-for-long-duration-playbooks-ran-against-windows-servers/20624/2 "2016-02-19T20:47:43Z")

</div>

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/](https://blogs.technet.microsoft.com/heyscriptingguy/2013/07/30/learn-how-to-configure-powershell-memory/)

J
