Interesting - so it's not about fact gathering at all. Experimentation to see if regular SSH commands have issues with first connections would be welcome.
It might result in the need to file a ticket on the distro. On Wed, Nov 5, 2014 at 5:50 PM, Greg Andrews <[email protected]> wrote: > > 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 > <https://groups.google.com/d/msgid/ansible-project/CAPdwyX7QVwgx5DLbQQjTFnKqOFt9Efr81e46K6hi-QhUBX4TWw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgwEqsKPCqcs1LAR-HENk7U0hOGJv5wtkAVdV886nt5iuA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
