Ansible ping module query.

Hello,

I am new to Ansible.

I have a list of server ip’s and I am using ping module to check if the servers are reachable or not.

When I pass the password it works fine, However when I pass the private key it works for few servers and at some point it just hangs and it doesn’t proceed further.

Do I have to make any changes in ansible.cfg file? Any timeout o something? Any logs where I can check?

Would be appreciated if some one could guide me on this.

Thanks in advance.