By default, the ansible-doc command will use module as the type, thus the -t or --type option followed by connection must be used to display documentation on the different type of connections that can be used.
The -l or --list option can be used to display the connections that can be used. Refer to Ansible - Getting Started with SSH.
ansible-doc --type connection buildah Interact with an existing buildah container chroot Interact with local chroot docker Run tasks in docker containers funcd Use funcd to connect to target httpapi Use httpapi to run command on network appliances iocage Run tasks in iocage jails jail Run tasks in jails kubectl Execute tasks in pods running on Kubernetes libvirt_lxc Run tasks in lxc containers via libvirt local execute on controller lxc Run tasks in lxc containers via lxc python library lxd Run tasks in lxc containers via lxc CLI napalm Provides persistent connection using NAPALM netconf Provides a persistent connection using the netconf protocol network_cli Use network_cli to run command on network appliances oc Execute tasks in pods running on OpenShift paramiko_ssh Run tasks via python ssh (paramiko) persistent Use a persistent unix socket for connection podman Interact with an existing podman container psrp Run tasks over Microsoft PowerShell Remoting Protocol qubes Interact with an existing QubesOS AppVM saltstack Allow ansible to piggyback on salt minions ssh connect via ssh client binary vmware_tools Execute tasks inside a VM via VMware Tools winrm Run tasks over Microsoft's WinRM zone Run tasks in a zone instance
Let's say you want to learn about "local". The -s or --snippet option can be used.
ansible-doc --type connection --snippet local > LOCAL (/usr/local/lib/python3.6/site-packages/ansible/plugins/connection/local.py) This connection plugin allows ansible to execute tasks on the Ansible 'controller' instead of on a remote host. * This module is maintained by The Ansible Community NOTES: * The remote user is ignored, the user with which the ansible CLI was executed is used instead. AUTHOR: ansible (@core) METADATA: status: - preview supported_by: community