slow gathering_facts followed by a long pause before first task

Have an odd one here,

I’m on ansible 1.6.2, my plays run slow, I’m stuck with RH6 so controlmaster/persist is not an option.
I have this weird behaviour where gathering facts from a box takes almost a minute, and then it just sits there for another 47 seconds or so before it starts the first task in the playbook.

00:00:03.965 PLAY [my_servers] ********************************************************
00:00:03.965
00:00:03.965 GATHERING FACTS ***************************************************************
00:00:57.581 ok: [mybox1]
00:00:58.565 ok: [mybox2]
00:00:59.314 ok: [mybox3]
00:01:47.968
00:01:47.968 TASK: [remove this host from the load balancer config] ************************

any clues?

Can you please upgrade to the latest stable version, 1.7.2 and see if you still have problems?

This may not be this, but due to list volume, we’re limited in supporting older versions here.

You might also enjoy “accelerated mode” though this doesn’t really help you with an individually slow step, I suspect there’s something wrong with what the setup module is doing.

on the local machine, can you checkout ansible (devel branch is fine), and try:

source ./hacking/env-setup
./hacking/test-module -m setup

This will allow you to run the setup module locally and if need be, run it with some debug breakpoints or printouts added to see where it’s holding up. (Unfortunately some development familiarity is required)

Perhaps it’s not a thing on 1.7.2 regardless, so I’d try that first.

Thanks!

Same issue with 1.7.2,
I have worked around the ControlPersist issue by installing a openssh6 client on my control host, it helps a lot.

The issue I had mentioned earlier is actually due to ansible vault,

with a set of encrypted vault files:

Nov 11 10:46:22 GATHERING FACTS ***************************************************************
Nov 11 10:48:15 ok: [box1]
Nov 11 10:48:17 ok: [box2]
Nov 11 10:48:17 ok: [box3]
Nov 11 10:51:49
Nov 11 10:51:49 TASK: [mytask] ********************

after decrypting all my vault files:

Nov 11 10:58:52 GATHERING FACTS ***************************************************************
Nov 11 10:59:00 ok: [box1]
Nov 11 10:59:00 ok: [box2]
Nov 11 10:59:00 ok: [box3]
Nov 11 10:59:13
Nov 11 10:59:13 TASK: [mytask] ********************

we have a set of encrypted files, around 10 or so, so that we can manage change with git a little bit better.
However each file takes some time to decrypt and increases ansible run time (the extra 1m30s is quite a lot for us).
Will look into an alternative to vault.