parallel execution

We got burned by this too.

We use Ansible from a single Jenkins server to manage instances in multiple EC2 VPCs. We use strict host checking for security and we have a custom known_hosts file per VPC (we’ve automated updates to known_hosts on each deploy).

“Reading the SSH config to pick up the correct known_hosts locations” (option #1 posted by Matt) seems the most intuitive solution.

Guess we are generally spoiled by Ansible :slight_smile: Ansible fits so well into our workflows that we assumed it would also honor our ssh configuration. And in fact Ansible mostly does honor our ssh configuration because our playbooks and adhocs do run with the custom known_hosts – but the silent impact to performance (serial, never parallel) was unexpected.

Appreciate your work!

– Steve

Ansible boasts the forks (process) approach where you can run the same plays on multiple hosts. But what I’m looking for is true multi-threading where multiple sections of the code can run asynchronously and in ANY order depending on what’s ready when when you have to wait for say, AWS modules that create resources: RDS and AMI. I’m not sure the async with poll and async_status options can give you this capability but I seriously hope so, the documentation is rather vague:
http://docs.ansible.com/ansible/playbooks_async.html
http://docs.ansible.com/ansible/async_status_module.html