ansible 使用密码登录远程主机报错


报错信息:

1987demac:~ root# ansible all -m ping
1921.68.28.108 | FAILED! => {
    "msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"
}

解决方式

$ wget http://sourceforge.net/projects/sshpass/files/latest/download -O sshpass.tar.gz 
$ tar -xvf sshpass.tar.gz 
$ cd sshpass-1.06 
$ ./configure 
$ sudo make install