What is a quick-win checklist for a slow playbook?
BeginnerProductionPerformance and Scale
Answer
pipelining = Trueand ControlPersist.forksraised to match the controller and the targets.gather_facts: falsewhere not needed;gather_subsetand caching otherwise.- Package names as lists, no one-item loops.
profile_tasksto find slow tasks and fix the top few.asyncfor slow independent tasks,freestrategy where tasks are independent.- Local mirrors for packages and artifacts.
- Run only what changed:
--limit, tags.
Most of the gain comes from items 1 to 3.
More on Performance and Scale
Why can Ansible be slower than a shell script for 100 servers, and what dominates the time?BeginnerHow do you choose the `forks` value?BeginnerWhat is SSH pipelining and why does it help?BeginnerWhich SSH settings matter for performance and stability?IntermediateHow do you find out which tasks are slow?BeginnerHow do you reduce the cost of fact gathering?Intermediate