ansible sshpass install

  • Post author:
  • Post category:其他



all:
  hosts:
    ceph01:
      ansible_connection: ssh
      ansible_host: 10.100.201.161
    ceph02:
      ansible_connection: ssh
      ansible_host: 10.100.201.162
    ceph03:
      ansible_connection: ssh
      ansible_host: 10.100.201.163
    ceph04:
      ansible_connection: ssh
      ansible_host: 10.100.201.164

  children:
    ADMIN:
      hosts:
        ceph01:
    MON:
      hosts:
        ceph01:
        ceph02:
        ceph03:
        ceph04:
    OSD:
      hosts:
        ceph01:
        ceph02:
        ceph03:
        ceph04:
  vars:
    ansible_ssh_pass: 123@123He
    ansible_ssh_user: root


10.100.201.162 | FAILED! => {
    "msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"
}

安装apt-get install sshpass  

yum install sshpass 



版权声明:本文为zuopiezia原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。