Using a SSH password instead of a key is not possible because Host Key checking
解决方法:
vi /etc/ansible/ansible.cfg
# 在文件中进行搜索定位到
:/host_key_checking
# uncomment this to disable SSH key host checking
#host_key_checking = False
# 修改后:
# uncomment this to disable SSH key host checking
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》