# execute  command  using ansible  hang

**URL:** <https://forum.ansible.com/t/execute-command-using-ansible-hang/22379>\
**Category:** Ansible Project\
**Created:** [August 25, 2016, 8:55am UTC](https://forum.ansible.com/t/execute-command-using-ansible-hang/22379 "2016-08-25T08:55:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yao](https://avatars.discourse-cdn.com/v4/letter/y/2bfe46/32.png) [@Yao](https://forum.ansible.com/u/Yao)\
**Post date:** [August 25, 2016, 8:55am UTC](https://forum.ansible.com/t/execute-command-using-ansible-hang/22379/1 "2016-08-25T08:55:01Z")

</div>

when run a command using ansible:

ansible -vvvv test -m shell -a “df -h”  
Using /etc/ansible/ansible.cfg as config file  
Loaded callback minimal of type stdout, v2.0  
 ESTABLISH SSH CONNECTION FOR USER: root  
 SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o ServerAliveInterval=60 -o Port=37226 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=20 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r test ‘/bin/sh -c ‘"’“‘LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/bin/python && sleep 0’”’"‘’

then the prcess seem hang , I want it can stop after 30s,

I try using async in playbook
