Toshio Kuratomi <[email protected]> wrote:

> If I have
> only one line in my /etc/hosts file:
>
> 127.0.0.1   localhost
>
> Running: time ansible all -i "localhost," -m setup -c local
>
> takes anywhere from 0.9 seconds to 15 seconds.
>
> Adding a second line to /etc/hosts:
> 127.0.0.1 roan.lan
>
> brings runtime into the 0.3 to 0.7 second range.
>


If I read between the lines correctly, the faster operation happens when
youe add that line to /etc/hosts on your Ansible machine, not all the
target machines.

If that's true, it appears an Ansible process running on the Ansible
machine is triggering a forward lookup of the hostname (i.e., trying to
obtain the IP address) as connections to target nodes are initiated.  I'm
not familiar with Red Hat based distros, so I don't know if if could be an
ssh client config thing, or an ssh agent config thing, or a paramiko thing,
or something else.

  -Greg

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPdwyX7QVwgx5DLbQQjTFnKqOFt9Efr81e46K6hi-QhUBX4TWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to