使用playbooks来ping主机时显示"Using a SSH password instead of a key is not possible

来源:互联网 发布:吉林11选5数据遗漏 编辑:程序博客网 时间:2024/06/03 06:28

fatal: [192.168.1.76]: FAILED! => {“failed”: true, “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.”}

解决方案:
首先,需要关闭hosts文件中主机的防火墙
systemctl stop firewalld.service
然后,在ansible这端的主机去ssh连接hosts文件中的虚拟机,此过程会生成秘钥,此流程走通后就可以使用ansible来ping主机

阅读全文
0 0