# Ansible Command is not completing in playbook

**URL:** <https://forum.ansible.com/t/ansible-command-is-not-completing-in-playbook/33345>\
**Category:** Ansible Project\
**Created:** [July 8, 2020, 6:52am UTC](https://forum.ansible.com/t/ansible-command-is-not-completing-in-playbook/33345 "2020-07-08T06:52:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jitendra\_Deshmukh](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@Jitendra\_Deshmukh](https://forum.ansible.com/u/Jitendra_Deshmukh)\
**Post date:** [July 8, 2020, 6:52am UTC](https://forum.ansible.com/t/ansible-command-is-not-completing-in-playbook/33345/1 "2020-07-08T06:52:02Z")

</div>

Hi have play book to run tcpdump, play run simple command of tcpdump but the command is not getting completed and stuck in play book though command is running sucessfully on remote host but playbook not proceeding to next task,

below is the play

- name: run non-local  
command: tcpdump -n -i {(Interface}} host {{destination}} -s {{snaplen}} -C {{Filesize}} -W {{Filesize}} -w {{Path}}${HOSTNAME}\_eth1.pcap -Z root  
when: inventory\_hostname == item and Destination\_host != “local”

---

<div class="post-metadata">

**Author:** ![Srinivas\_Naram](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@Srinivas\_Naram](https://forum.ansible.com/u/Srinivas_Naram)\
**Post date:** [July 8, 2020, 11:16am UTC](https://forum.ansible.com/t/ansible-command-is-not-completing-in-playbook/33345/2 "2020-07-08T11:16:15Z")

</div>

What errors are you seeing when playbook exits ?

I presume that you are seeing a timeout error. This is because tcpdump is taking too long to fill the file.

following link might help - [https://docs.ansible.com/ansible/latest/network/user\_guide/network\_debug\_troubleshooting.html#timeout-issues](https://docs.ansible.com/ansible/latest/network/user_guide/network_debug_troubleshooting.html#timeout-issues)
