Estimate total time for Ansible tasks to complete across all target hosts.
Total playbook time has two components: the actual task work (tasks × average duration) and one-time-per-host connection setup (SSH handshake, becoming root, Python interpreter discovery). This model assumes pipelining/ControlPersist is enabled so connection setup is paid once per host per run rather than once per task per host — without those optimizations, connection overhead can dominate total run time.
total_sec = tasks × avg_duration_sec + connection_setup_sec × hosts
With SSH ControlPersist and pipelining enabled (recommended), Ansible reuses one SSH connection for the whole play against a host, so the connection cost is amortized across all tasks rather than repeated for every task.
Without pipelining, Ansible copies a module file to the remote host and executes it in a separate step for every task, which can multiply connection-related overhead — model this by using a higher 'connection setup time' input to approximate the extra round trips.
Batch related operations into fewer, coarser tasks (e.g. one `package` call with a list instead of one task per package), use `async`/`poll` for long-running tasks, and avoid `command`/`shell` when a native module with less overhead exists.
No — this estimates work per host. Combine with the Host Parallelism Calculator to see how forks reduce the wall-clock time of running this workload across your full host count.