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

58 views
Skip to first unread message

Kiran

unread,
Feb 18, 2016, 8:57:27 PM2/18/16
to Ansible Project
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.

Slim Slam

unread,
Feb 19, 2016, 3:47:43 PM2/19/16
to Ansible Project
Just a guess, but maybe tweaking the winrm params on the Windows machine might help:


J
Reply all
Reply to author
Forward
0 new messages