# execute ansible command very slowly

**URL:** <https://forum.ansible.com/t/execute-ansible-command-very-slowly/33927>\
**Category:** Ansible Project\
**Created:** [September 30, 2020, 5:47am UTC](https://forum.ansible.com/t/execute-ansible-command-very-slowly/33927 "2020-09-30T05:47:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MJ1](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@MJ1](https://forum.ansible.com/u/MJ1)\
**Post date:** [September 30, 2020, 5:47am UTC](https://forum.ansible.com/t/execute-ansible-command-very-slowly/33927/1 "2020-09-30T05:47:53Z")

</div>

I’ve installed ansible in CentOS6.5, then added host group **bocai\_ecs\_all** in /etc/ansible/ansible.cfg.  
[bocai\_ecs\_all]  
bocaiserver1  
bocaiserver2 (centos7.6)  
bocaiserver3  
bocaiserver4 (centos7.6)  
bocaiserver5  
And then run the following command in shell, some machines took very long time about 60 seconds. I found those slow machines are all installed CentOS7.6.  
**ansible bocai\_ecs\_all -m ping**

what will be the cause?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [September 30, 2020, 6:13am UTC](https://forum.ansible.com/t/execute-ansible-command-very-slowly/33927/2 "2020-09-30T06:13:54Z")

</div>

> I've installed ansible in CentOS6.5, then added host group \*bocai\_ecs\_all\* in /etc/ansible/ansible.cfg.  
> [bocai\_ecs\_all]  
> bocaiserver1  
> bocaiserver2 (centos7.6)  
> bocaiserver3  
> bocaiserver4 (centos7.6)  
> bocaiserver5  
> And then run the following command in shell, some machines took very long time about 60 seconds. I found those slow  
> machines are all installed CentOS7.6.  
> \*ansible bocai\_ecs\_all -m ping\*
> 
> what will be the cause?

Check the DNS setup on the affected machine. It is possible that they try a reverse lookup on the IP you connect from,  
but can not reach the configured DNS server.

That could be the cause.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![MJ1](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@MJ1](https://forum.ansible.com/u/MJ1)\
**Post date:** [September 30, 2020, 10:30am UTC](https://forum.ansible.com/t/execute-ansible-command-very-slowly/33927/3 "2020-09-30T10:30:53Z")

</div>

Thanks for your reply.  
I can get success ping response from CentOS6.5(ansible is installed）on the server with CentOS7.6. And I can also quickly logon to server(CentOS7.6) from the CentOS6.5 via ssh.
