我在使用 Ansible 在 Windows 2008 服务器上进行部署时遇到问题。我有一个詹金斯管道,它有一个 Ansible 部署阶段,其中我将文件从清单中放到目标服务器上。我已经能够在相当多的服务器上成功地做到这一点。但是对于某些服务器,我看到上述错误消息。
这是詹金斯管道的输出
TASK [debug] *******************************************************************
ok: [ch3dw026394.mydomain.com] => {
"msg": "Hello world!"
}
TASK [Testing connection to windows] *******************************************
fatal: [ch3dw026394.mydomain.com]: UNREACHABLE! => {"changed": false, "msg": "ntlm: ('Connection aborted.', error(104, 'Connection reset by peer'))", "unreachable": true}
Run Code Online (Sandbox Code Playgroud)
这是 win_ping 的 Ansible playbook 模块
#Testing connection with Target
- debug:
msg: "Testing connection to windows {{ inventory_hostname }}"
- name: Testing connection to windows
win_ping: null
any_errors_fatal: true
Run Code Online (Sandbox Code Playgroud)
我对此做了很多研究,但以下选项均无效
关闭 Windows 2008 服务器上的 UAC。
不起作用 …