Ansible连接远程主机

Ansible连接
SSH on Unix
密码访问
安装sshpass
sudo apt install sshpass
使用ansible_password变量
密钥访问
配置密钥连接
WinRM on Windows
管理机: 安装python winrm模块
sudo pip install pywinrm
被管理机
Powershell
$psversiontable
Configure WinRM for Ansible:ConfigureRemotingForAnsible.ps1
https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1
连接测试