CertGrid CertGrid
Hands-on Lab·Ansible

Ansible Performance Tuning

Ansible performance advice is mostly repeated without measurement. This times one playbook against a baseline, with pipelining, with fact caching and with ten times the forks - alternating the runs so the answer cannot be first-run warm-up. Three settings move the number, one does nothing, and the obvious way to check whether pipelining is on reports the wrong answer.

Bonus: Beyond the Blueprint Guide 43 of 45 Intermediate

Written against the versions above. `pipelining` is off by default for one reason: it is incompatible with `sudo` configured `requiretty`, which was the RHEL default long ago and is not any more. On ansible-core 2.20.1 `ansible-config dump` does not report its effective value - see the fourth step, which is why that step exists.

Two managed nodes. The forks result at the end is only honest because there are two - the point of it is that raising the limit cannot help.
Server NameIP AddressOSRolesCPURAMHDD
ANS-CTL01192.168.0.36Ubuntu 26.04 LTSAnsible Control Node2 Core3 GB50 GB
ANS-A01192.168.0.37Ubuntu 26.04 LTSManaged Node (group: web)2 Core3 GB50 GB
ANS-B01192.168.0.38Ubuntu 26.04 LTSManaged Node (group: db)2 Core3 GB50 GB

Before you start

  1. The configuration this guide assumes

  2. One run is not a measurement

  3. What pipelining actually removes

  4. The check that reports the wrong answer

  5. Fact caching

  6. The setting that does nothing here

Official sources