3

Ansible command:

ansible all -m module-name -o  -e "ansible_user=username ansible_password=password"  

Giving following error :

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

Smily
  • 2,308
  • 2
  • 17
  • 41
ross
  • 111
  • 1
  • 2
  • 9

1 Answers1

5
  • Install sshpass: apt-get update apt-get- install sshpass

  • if not This error can solved by exporting environment variable. export ANSIBLE_HOST_KEY_CHECKING=False

  • If not try to create a file ansible.cfg in your current folder with the following contents: [defaults] host_key_checking = false

ross
  • 111
  • 1
  • 2
  • 9