# Ansible Playbook running for longtime/indefinitely for windows 2012 R2 Ansible Playbook

**URL:** <https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931>\
**Category:** Ansible Project\
**Tags:** windows, rhel\
**Created:** [March 8, 2018, 7:32am UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931 "2018-03-08T07:32:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Namasivayam\_C](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Namasivayam\_C](https://forum.ansible.com/u/Namasivayam_C)\
**Post date:** [March 8, 2018, 7:32am UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931/1 "2018-03-08T07:32:51Z")

</div>

I am new to Ansible and I’m trying to configure windows 2012 R2 from RHEL 7 Ansible Node. I’m able to establish connection between them using Winrm Credssp. Below is /etc/ansible/group\_vars/windows.yml file

COMPONENT NAME  
urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320

ANSIBLE VERSION  
ansible 2.3.1.0

python version = 2.7.5

ansible\_user: admin  
ansible\_password: XXXXXXX  
ansible\_winrm\_scheme: https  
ansible\_winrm\_transport: credssp  
ansible\_port: 5986  
ansible\_connection: winrm  
ansible\_winrm\_server\_cert\_validation: ignore  
validate\_certs: false

When I execute win\_ping module for testing connection from Ansible node to Windows 2012 R2 server it was successful.

[root@Ansible-Server playbooks]# ansible windows -m win\_ping  
XX.XX.XX.XX | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}

But When I have tried executing Windows 2012 R2 playbook file, after submitting ansible-playbook playbook.yml command, it is continuously waiting for indefinite time, as It is not completing.

Below is the log that is constantly displaying same. Waiting continuously. /var/log/ansible/log

2018-03-07 19:34:14,255 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:34:34,256 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:34:54,256 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:35:14,258 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:35:34,257 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:35:54,272 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:36:14,272 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:36:34,273 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:36:54,273 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:37:14,273 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:37:34,273 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:37:54,274 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:38:14,274 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:38:34,274 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320  
2018-03-07 19:38:54,274 urllib3.connectionpool [https://192.168.2.211:5986](https://192.168.2.211:5986/) “POST /wsman HTTP/1.1” 500 1320

above log continues/updates same for every 20 sec.

Could you please any one suggest where it’ got stuck and how i can identify and troubleshoot .

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [March 8, 2018, 7:41pm UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931/2 "2018-03-08T19:41:15Z")

</div>

We would probably need to see the playbook file and the output you are getting until it freezes so we can narrow down what task is taking forever. As for the HTTP 500 responses I don’t think they are an issue, part of WinRM is to poll for command outputs and you get constant 500 responses from the server if there is no output so we try again until the command is complete.

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [March 8, 2018, 8:50pm UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931/3 "2018-03-08T20:50:59Z")

</div>

Here are two things you can try  
Try putting the win\_ping module in a task in a playbook and run it.  
Try adding -vvvvv (5 v for winrm connection debug info) to ansible-playbook

---

<div class="post-metadata">

**Author:** ![Ramanjaneyulu\_S](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ramanjaneyulu\_S](https://forum.ansible.com/u/Ramanjaneyulu_S)\
**Post date:** [April 12, 2018, 3:01pm UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931/4 "2018-04-12T15:01:07Z")

</div>

I have the same issue while using win\_packageto install applications on remote windows servers. in the log ansible is giving status code 200 thrice and then status code 500 consistently.

let me know, if you got any workaround.

Thank you

---

<div class="post-metadata">

**Author:** ![Namasivayam\_C](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Namasivayam\_C](https://forum.ansible.com/u/Namasivayam_C)\
**Post date:** [April 13, 2018, 4:47pm UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931/5 "2018-04-13T16:47:25Z")

</div>

Hi

We have rebooted the Ansible server issues got fixed

---

<div class="post-metadata">

**Author:** ![Ramanjaneyulu\_S](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ramanjaneyulu\_S](https://forum.ansible.com/u/Ramanjaneyulu_S)\
**Post date:** [April 16, 2018, 6:12pm UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931/6 "2018-04-16T18:12:28Z")

</div>

Thanks for replying. Unfortunately, rebooting did not worked for me.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [April 17, 2018, 8:33am UTC](https://forum.ansible.com/t/ansible-playbook-running-for-longtime-indefinitely-for-windows-2012-r2-ansible-playbook/26931/7 "2018-04-17T08:33:08Z")

</div>

Please share your playbook so others can understand what ansible is attempting to do.
