Ansible executes playbooks in the remote server using following connection type. To change the connection type, you need to pass host-specific parameter ansible_connection=<connector>, the connection type can be changed.
SSH Based (Linux Based)
The default SSH protocol types is smart. This can be the name of any of ansible’s connection plugins. SSH protocol types are..
Non-SSH Based (Linux Based)
- local – This connector can be used to deploy the playbook to the control machine itself.
- docker – This connector deploys the playbook directly into Docker containers using the local Docker client.
WinRM Based (Windows Based)
Unlike Linux/Unix hosts, which use SSH by default, Windows hosts are configured with WinRM.
The authentication type may be set on inventory hosts or groups with the ansible_winrm_transport variable. ansible_winrm_transport may include
other1.example.com ansible_connection=ssh ansible_user=mpdehaan