# How to debug very simple hanging playbook

**URL:** <https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864>\
**Category:** Ansible Project\
**Created:** [July 27, 2015, 4:32pm UTC](https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864 "2015-07-27T16:32:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivier\_Lauret](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Olivier\_Lauret](https://forum.ansible.com/u/Olivier_Lauret)\
**Post date:** [July 27, 2015, 4:32pm UTC](https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864/1 "2015-07-27T16:32:03Z")

</div>

Hi all, I was wondering if there was away to debug a very simple playbook when it is hanging.

### Playbook:

- name: Install app on my servers  
hosts: my\_hosts  
gather\_facts: no  
remote\_user: my\_user  
su: yes

roles:

- app\_install

#### app\_install role (under tasks/main.yml)

- name: query whoami  
shell: whoami

It always hangs at the this level:

_[PROJECT] myotheruser@myprodserver# ansible-playbook -i hosts -k --ask-su-pass my\_playbook.yml -vvvv_  
_SSH password:_  
_SU password[defaults to SSH password]:_

_PLAY [Install app on my servers] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_

_TASK: [app\_install | query whoami] \*\*\*_  
_\<my\_server.mydomain.com\> ESTABLISH CONNECTION FOR USER: my\_user on PORT 22 TO my\_server.mydomain.com_  
_\<my\_server.mydomain.com\> REMOTE\_MODULE command whoami #USE\_SHELL_  
_\<my\_server.mydomain.com\> EXEC /bin/sh -c ‘mkdir -p /tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733 && chmod a+rx /tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733 && echo /tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733’_  
_\<my\_server.mydomain.com\> PUT /tmp/tmp6UGeFE TO /tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733/command_  
_\<my\_server.mydomain.com\> EXEC /bin/sh -c ‘su root -c “/bin/sh -c '”’“‘echo BECOME-SUCCESS-xzmbgooensxgrlbezhnlngbagojwbczg; LANG=en\_US.UTF-8 LC\_CTYPE=en\_US.UTF-8 /usr/bin/python /tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733/command; rm -rf /tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733/ \>/dev/null 2\>&1’”‘"’"’_

And nothing else!

Ping works on this server.

Any idea?

Regards,  
Olivier

---

<div class="post-metadata">

**Author:** ![Olivier\_Lauret](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Olivier\_Lauret](https://forum.ansible.com/u/Olivier_Lauret)\
**Post date:** [July 28, 2015, 10:13am UTC](https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864/2 "2015-07-28T10:13:16Z")

</div>

Hello all,

The problem still persists but I have more information:

- Ansible version: ansible 1.9.1

- Everything works if I am NOT using “su”

- I can run manually on the server the last ansible command displayed in my log.

- The password prompt is “Password:”

- Gather facts works fine

- Python 2.6.6

- Linux machine

Is it something related to the “Password:” prompt? How to find this out?

Regards,

Olivier

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 28, 2015, 12:39pm UTC](https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864/3 "2015-07-28T12:39:22Z")

</div>

try logging onto the machine and run this by hand:

/bin/sh -c 'su root -c "/bin/sh -c '"'"'echo  
BECOME-SUCCESS-xzmbgooensxgrlbezhnlngbagojwbczg; LANG=en\_US.UTF-8  
LC\_CTYPE=en\_US.UTF-8 /usr/bin/python  
/tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733/command;  
rm -rf /tmp/.ansible\_my\_user/tmp/ansible-tmp-1438014075.95-221459817104733/

---

<div class="post-metadata">

**Author:** ![Olivier\_Lauret](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Olivier\_Lauret](https://forum.ansible.com/u/Olivier_Lauret)\
**Post date:** [July 28, 2015, 3:52pm UTC](https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864/4 "2015-07-28T15:52:23Z")

</div>

Hello Brian,

Thank you for your answer. I have tried that and it is working fine. Thisi is reference to the “Password:” I mentioned earlier.

The problem seems to be related to the version of ansible. It is working fine in 1.6.10 but not in 1.9.1

I am testing now the latest stable version (1.9.2-1).

Regards,  
Olivier

---

<div class="post-metadata">

**Author:** ![Olivier\_Lauret](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Olivier\_Lauret](https://forum.ansible.com/u/Olivier_Lauret)\
**Post date:** [July 29, 2015, 9:10pm UTC](https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864/5 "2015-07-29T21:10:26Z")

</div>

Hi All,

I have tested the latest version and I have the same behaviour. So, so far , only works in 1.6.10. I guess, this is a regression.

Regards,  
Olivier

---

<div class="post-metadata">

**Author:** ![Olivier\_Lauret](https://avatars.discourse-cdn.com/v4/letter/o/b3f665/32.png) [@Olivier\_Lauret](https://forum.ansible.com/u/Olivier_Lauret)\
**Post date:** [July 30, 2015, 7:25pm UTC](https://forum.ansible.com/t/how-to-debug-very-simple-hanging-playbook/18864/6 "2015-07-30T19:25:05Z")

</div>

Hi All,

I finally found the issue. It is related to the bug [#9847](https://github.com/ansible/ansible/issues/9847). If the user doesn’t have a home folder assign, we have this issue. The workaround is pretty easy and well explained in the bug report. Thank you @arlinton and Brian for your help.

Regards,  
Olivier
