【发布时间】:2019-08-22 15:17:30
【问题描述】:
当我从一台服务器执行 ansible playbook 到另一台远程服务器时,我收到一个错误,因为
"msg": "通过 ssh 连接主机失败: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory\r\n主机密钥验证失败。", "unreachable":真的”
吹是我的剧本
- hosts: igwcluster_AM:igwcluster_IS
become: true
become_method: sudo
gather_facts: True
tasks:
- name: Install Oracle Java 8
script:/data2/jenkins/workspace/PreReq_Install_To_Servers/IGW/IGW_Cluster/prereqs_Products/Java.sh
我正在使用两个主机组,每个组有 2 台服务器。
错误日志:
无法访问! => {"changed": false, "msg": "通过 ssh 连接主机失败:ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory\r\n主机密钥验证失败。 ", "无法访问": true}
注意:我已经尝试过
host_key_checking = False
ssh_args = -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
但还是失败了。请给我建议
【问题讨论】: