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

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