fact caching
Storing gathered facts between runs, so later plays can reuse them instead of collecting them again from every host.
In more detail
It is configured with a cache plugin and a timeout in ansible.cfg. It helps large fleets, but cached facts can be stale, so adopt it with a clear policy on how long values may be trusted. Inventory plugins have a separate cache setting for host lists.
Related terms
- fact gathering — The automatic first step of a play that runs the setup module on every host to collect its facts.
- fact — A variable Ansible discovers about a host itself, such as its operating system, host name, memory or network addresses.
- plugin — An add-on package that extends a tool with extra features without changing the tool itself.
- ansible.cfg — Ansible's INI-format settings file; a copy in the project directory sets options such as the inventory location and forks for everyone who runs there.
Taught in
- Performance, Forks And Best Practices — Ansible Configuration Management at Scale