Interview Prep/Ansible/Architecture Decisions and Tool Comparisons

How do you choose the connection type for different targets?

IntermediateProductionArchitecture Decisions and Tool Comparisons
Answer
Target Connection Notes
Linux, reachable ssh (default) Pipelining and ControlPersist for speed
AWS instances without SSH amazon.aws.aws_ssm Needs SSM agent, instance role and an S3 bucket for file transfer
Windows winrm or psrp, or ssh on modern Windows PSRP is faster; use HTTPS and Kerberos or certificates
Network devices ansible.netcommon.network_cli, netconf, httpapi Set ansible_network_os
Containers community.docker.docker, containers.podman.podman For testing or one-offs, not production config
The controller itself local API calls, cloud modules

Set the connection per group in group_vars, not on the command line, so the right one is used every time.

All Ansible questions Roadmap: Ansible

More on Architecture Decisions and Tool Comparisons