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.

相关文章:

  • 2021-06-06
  • 2021-06-17
  • 2021-05-16
  • 2021-12-28
  • 2022-02-10
  • 2021-12-20
  • 2021-10-21
猜你喜欢
  • 2022-12-23
  • 2021-07-04
  • 2021-12-13
  • 2021-09-28
  • 2021-07-04
  • 2021-12-05
  • 2021-05-30
相关资源
相似解决方案