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"}
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With