无法使用Ansible ping windows计算机
我是Ansible新手,正在尝试使用Ansible连接到windows计算机。 我得到以下错误无法使用Ansible ping windows计算机,ansible,Ansible,我是Ansible新手,正在尝试使用Ansible连接到windows计算机。 我得到以下错误 xxx.xxx.xxx.com | UNREACHABLE! => { "changed": false, "msg": "plaintext: HTTPConnectionPool(host='xxx.xxx.xxx.com', port=5985): Max retries exceeded with url: /wsman (Caused by NewConnectionError('&l
xxx.xxx.xxx.com | UNREACHABLE! => {
"changed": false,
"msg": "plaintext: HTTPConnectionPool(host='xxx.xxx.xxx.com', port=5985): Max retries exceeded with url: /wsman (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x3d76050>: Failed to establish a new connection: [Errno 111] Connection refused',))",
"unreachable": true
xxx.xxx.xxx.com |无法访问!=>{
“更改”:错误,
“msg”:“明文:HTTPConnectionPool(host='xxx.xxx.xxx.com',port=5985):url:/wsman超过了最大重试次数(由NewConnectionError引起(':未能建立新连接:[Errno 111]连接被拒绝',)”,
“遥不可及”:真实
}
我对这三个文件进行了更改
由于这将添加自签名证书,请确保将
ansible\u winrm\u server\u cert\u validation:ignore
添加到您的组\u vars/windows.yml只是为了确定,您已经在清单中的windows计算机上设置了winrm功能,对吗?不,我没有,但我会这么做的。我也尝试了{ansible windows-I hosts-m ping},这也返回了相同的错误,-m ping实际上使用ssh,它不是传统的ICMP ping。由于Windows使用“winrm”而不是“ssh”,因此“-m ping”在Windows系统上失败。