ansible使用中遇到的问题

前提是,可以ssh无秘钥过去,但是使用ansible就报这个错误,

正在找造成的原因及解决方法

第一步,

明白了,,如何已经打通ssh无秘钥后,就不能再 hosts中加入ansible_ssh_pass= 这个参数了,不然,ansible带着这个走,有点搞不明白

 

遇到另外一个问题,

"changed": false,
    "msg": "Failed to connect to the host via ssh.",
    "unreachable": true

解决方法:

在 要执行远程操作服务器的 host清单中,增加  ansible_ssh_user=test

如:0.0.0.0 ansible_ssh_user=test

 

 

问题啊:

Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.  Please add this host's fingerprint to your known_hosts file to manage this host.

posted @ 2017-02-08 17:45  jackchen007  阅读(526)  评论(0)    收藏  举报