Interview Prep/Ansible/Performance and Scale

Which timeouts matter and how do you set them?

IntermediateProductionPerformance and Scale
Answer
  • timeout in [defaults] (or ansible_ssh_timeout/-T): connection establishment, default 10 seconds.
  • ServerAliveInterval in ssh_args: detects dead sessions during long tasks.
  • async plus poll: for tasks that run longer than the connection can reliably last.
  • Module-specific timeouts: wait_for.timeout, reboot_timeout, uri.timeout.
  • ansible_command_timeout for 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.

All Ansible questions Roadmap: Ansible

More on Performance and Scale