Ansible does read ~/.ssh/known_hosts because it needs to know whether to
lock itself down to 1 process to ask you the question about adding a new
hosts to known_hosts.

This only happens when it detects a host isn't already there, because it
must detect this before SSH asks.

And this only happens with -c ssh, -c paramiko has it's own handling (and
it's own issues, I prefer the SSH implementation if folks have a new enough
SSH to use ControlPersist).



On Mon, Sep 29, 2014 at 11:37 AM, Vincent Janelle <[email protected]
> wrote:

> Exactly like what was described at the start of this thread. :(  Setting
> the environment variable produces the desired parallel execution.
>
> On Monday, 29 September 2014 08:05:59 UTC-7, James Cammarata wrote:
>>
>> Hi Vincent, could you share a sample of the playbook you're running as
>> well as the results of running it with -f1, -f2 and -f4? That should
>> determine if the playbook is indeed being serialized at some point.
>>
>> Do note, however, if you're doing something like this:
>>
>> - local_action: ec2 ...
>>   with_items:
>>     - ...
>>     - ...
>>     - ...
>>
>> you will see serialized performance. This is caused by the fact that each
>> pass through with_* loops must complete on all hosts before the next loop
>> begins, and with local_action you'd only be executing on a single host
>> (localhost), so this would constrain the playbook to a serial-like
>> performance.
>>
>> Thanks!
>>
>> On Mon, Sep 29, 2014 at 9:44 AM, Vincent Janelle <[email protected]>
>> wrote:
>>
>>> Not sure how I'd send you a copy of /dev/null, unless ansible is
>>> attempting to parse the contents of ~/.ssh/known_hosts outside of ssh.
>>>
>>> On Monday, 29 September 2014 07:39:20 UTC-7, Michael DeHaan wrote:
>>>>
>>>> Any chance I can get a copy of your known_hosts file?
>>>>
>>>> Off list would be preferred.
>>>>
>>>> I'm not sure that's it, but I suspect it could be.
>>>>
>>>>
>>>>
>>>> On Mon, Sep 29, 2014 at 10:35 AM, Vincent Janelle <[email protected]
>>>> > wrote:
>>>>
>>>>> Just an update at Michael's request - seeing the exact same
>>>>> situations, with ec2.
>>>>>
>>>>> Setting this environment variable fixes this.
>>>>>
>>>>> On Thursday, 12 September 2013 15:34:33 UTC-7, Michael Blakeley wrote:
>>>>>>
>>>>>> On Thursday, September 12, 2013 3:21:23 PM UTC-7, James Cammarata
>>>>>> wrote:
>>>>>>>
>>>>>>> I believe the initial iteration through the hosts is
>>>>>>> single-threaded, as that occurs before the forks are created, however 
>>>>>>> can
>>>>>>> you demonstrate that your configuration is causing single-threaded 
>>>>>>> behavior
>>>>>>> after the forks are running?
>>>>>>>
>>>>>>
>>>>>> Yes, I think so. I observe single-threading for every command
>>>>>> throughout long playbooks. Setting ANSIBLE_HOST_KEY_CHECKING=no resolves
>>>>>> that.
>>>>>>
>>>>>> Does the output from this single command help?
>>>>>>
>>>>>> $ ansible -i ec2.py tag_Name_test -f 9 -a date
>>>>>> ec2-54-200-43-114.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:33 UTC 2013
>>>>>> ec2-54-200-40-223.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:35 UTC 2013
>>>>>> ec2-54-200-33-219.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:36 UTC 2013
>>>>>> ec2-54-200-40-249.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:38 UTC 2013
>>>>>> ec2-54-200-43-44.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:40 UTC 2013
>>>>>> ec2-54-200-43-42.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:42 UTC 2013
>>>>>> ec2-54-200-40-224.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:41 UTC 2013
>>>>>> ec2-54-200-42-181.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:43 UTC 2013
>>>>>> ec2-54-200-42-164.us-west-2.compute.amazonaws.com | success | rc=0 >>
>>>>>> Thu Sep 12 21:23:44 UTC 2013
>>>>>>
>>>>>> With ANSIBLE_HOST_KEY_CHECKING=no, the results return much more
>>>>>> quickly and all nine hosts display the same time (within 1-2 sec anyway).
>>>>>>
>>>>>  --
>>>>> 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/a828f04b-369e-4b75-acb2-522903aadbe0%
>>>>> 40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/ansible-project/a828f04b-369e-4b75-acb2-522903aadbe0%40googlegroups.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/feb40220-6a8b-4813-826d-
>>> 5447e9f1b3a8%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/feb40220-6a8b-4813-826d-5447e9f1b3a8%40googlegroups.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/c6313bab-23a5-4f5b-874c-826fdd029ace%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/c6313bab-23a5-4f5b-874c-826fdd029ace%40googlegroups.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%2BnsWgwSW-E3SDmVfQ8MEMkngfDfRdRz2D63iS2hKaHKBTNvxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to