Playbook runs against 1000 hosts are failing intermittently with SSH timeouts.
AdvancedScenarioPerformance, Testing and CI/CD
Answer
Situation read → Likely concurrency overload on the control node or network.
What I'd do →
- Check forks vs. bastion
MaxStartupsand controller CPU. - Set
timeout = 30andretries = 3under[ssh_connection]. - Reduce forks, enable ControlPersist and pipelining.
- Use
serialto limit batch size.
Why → Too many simultaneous handshakes drop connections.
Interview tip → Distinguish "unreachable" (connection) from "failed" (task) in the recap.
More on Performance, Testing and CI/CD
A playbook that touches 200 hosts takes 40 minutes. Where do you start tuning?IntermediateYou install 15 packages with a loop and it is slow.BeginnerHow would you test a role in CI before it reaches production?IntermediateWhat would a Molecule `verify.yml` check for an Nginx role?IntermediateMolecule's idempotence step fails. How do you find the offending task?IntermediateDesign a CI pipeline for an Ansible repo.Advanced