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 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