Using a SSH password instead of a key is not possible because Host Key checking

解决方法:

  1. vi /etc/ansible/ansible.cfg
  2. # 在文件中进行搜索定位到
  3. :/host_key_checking
  4. # uncomment this to disable SSH key host checking
  5. #host_key_checking = False
  6. # 修改后:
  7. # uncomment this to disable SSH key host checking
  8. host_key_checking = False

ssh connection type with passwords, you must install the sshpass program

这个问题是由于缺少sshpass模块导致,在Linux系统上可以直接通过包管理工具 yum \ apt-get 直接安装。但是在Mac系统上不行,需要通过sshpass.rb脚本来安装。
Mac上安装sshpass方法如下:https://www.yuque.com/docs/share/bbef519a-12e2-4002-92c3-4490dd5b999a?# 《macOS 安装 sshpass》