# ansible-playbook command run with shell module hangs for long time.

**URL:** <https://forum.ansible.com/t/ansible-playbook-command-run-with-shell-module-hangs-for-long-time/35554>\
**Category:** Ansible Project\
**Created:** [July 28, 2021, 6:17am UTC](https://forum.ansible.com/t/ansible-playbook-command-run-with-shell-module-hangs-for-long-time/35554 "2021-07-28T06:17:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav\_Swami](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@Gaurav\_Swami](https://forum.ansible.com/u/Gaurav_Swami)\
**Post date:** [July 28, 2021, 6:17am UTC](https://forum.ansible.com/t/ansible-playbook-command-run-with-shell-module-hangs-for-long-time/35554/1 "2021-07-28T06:17:12Z")

</div>

Hello,

I have below setup

Docker → System1 —\> System2

From docker image I spawn two systems using simple shell script , In System1 cloned automation repo , update/install the necessary packages, update hosts file( System2 details)

The playbook I am running from System1, includes

- name: Run ansible-playbook shell: “export ANSIBLE\_LIBRARY=/root/pki-pytest-ansible/common-modules/;ansible-playbook -u root --private-key=/root/pki-pytest-ansible/ssh-priv-key -i /root/pki-pytest-ansible/installation/host /root/pki-pytest-ansible/installation/main.yml -e ‘topology=topology-02’ -vvv \> /root/output.txt” register: result

But when above executes it remain in hang state [gather facts] until it reaches pipeline job timeouts.

In redirected output I can see

ansible-playbook 2.9.13  
config file = None  
configured module search path = [‘/root/pki-pytest-ansible/common-modules’]  
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible  
executable location = /usr/local/bin/ansible-playbook  
python version = 3.7.3 (default, Mar 27 2019, 13:36:35) [GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)]  
No config file found; using defaults

PLAYBOOK: enable\_root\_login.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in /root/pki-pytest-ansible/provision/playbooks/enable\_root\_login.yml

PLAY [all] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /root/pki-pytest-ansible/provision/playbooks/enable\_root\_login.yml:1
