轩辕阁 发表于 2018-1-3 10:47:05

ansible小结(四)ansible.cfg与默认配置

  FAILED => 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.
  从上面的输出提示上基本可以了解到由于在本机的~/.ssh/known_hosts文件中并有fingerprint key串,ssh第一次连接的时候一般会提示输入yes 进行确认为将key字符串加入到~/.ssh/known_hosts 文件中。
  在ansible.cfg配置文件中,也会找到如下部分:

[*]# uncomment this to disable SSH key host checking
[*]host_key_checking = False
  默认host_key_checking部分是注释的,通过找开该行的注释,同样也可以实现跳过 ssh 首次连接提示验证部分。由于配置文件中直接有该选项,所以推荐用该方法。
页: [1]
查看完整版本: ansible小结(四)ansible.cfg与默认配置