Ansible hangs when target host “10.9.88.205” does not have python installed.
I have successful ssh connectivity from ansible to target host shown below below:
ansible-host# ssh root@10.9.88.205
Below is my playbook:
- name: Play 2- Configure Source nodes
hosts: all
user: root
ignore_errors: yes
gather_facts: false
tasks:
- name: Get HTTPD userid on server
raw: id mwweb || id webadm || ls -ld /web
- name: Get OHS userid on server
raw: id mwweb
Below is how i run my playbook
$ ansible-playbook -i 10.9.88.205, -f 5 testpython.yml
PLAY [Play 2- Configure Source nodes] **********************************************************************************************************************************
TASK [Get HTTPD userid on server] **************************************************************************************************************************************
It just hangs after printing TASK [Get HTTPD userid on server] and never completes.
This behavior is experienced with all IPs where python is not installed and is reachable through ssh.
Below is my ansible version.
ansible --version
ansible 2.9.4
config file = /etc/ansible/ansible.cfg
configured module search path = [u’/home/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Sep 26 2019, 13:23:47) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Can you please suggest how can i get ansible not to hang and proceed to the next task i.e Get OHS userid on server?