Which timeouts matter and how do you set them?
IntermediateProductionPerformance and Scale
Answer
timeoutin[defaults](oransible_ssh_timeout/-T): connection establishment, default 10 seconds.ServerAliveIntervalinssh_args: detects dead sessions during long tasks.asyncpluspoll: for tasks that run longer than the connection can reliably last.- Module-specific timeouts:
wait_for.timeout,reboot_timeout,uri.timeout. ansible_command_timeoutfor network connections.
A hung task with no timeout blocks the entire batch in linear strategy, so put a timeout on every task that waits on something external, and fail loudly.
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