Anslib 使用错误归纳

一、遇到问题

[root@localhost ansible]# ansible test43 -m ping -k
SSH password:
192.168.30.43 | FAILED! => {
"msg": "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."
}

 

解决方法:在ansible.cfg文件中更改下面的参数:
#host_key_checking = False 将#号去掉即可(去掉的意思是不询问yes/no)

 

posted @ 2018-09-17 17:33  Presley  阅读(121)  评论(0编辑  收藏  举报