Ansible target2 VM error

I am new on Ansible, I followed the instructions from the course “Ansible for Absolute Beginners” and is stuck on Install Ansible Demo section. When I am trying to connect target2 vm from ansible controller I am getting following error " [root@ansiblecontroller test-project]# ansible target2 -m ping -i inventory.txt
target2 | FAILED! => {
“msg”: “Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host’s fingerprint to your known_hosts file to manage this host.”

but I am able to ping both ways and I don’t have an issue with target1 vm
[root@ansiblecontroller test-project]# ansible target1 -m ping -i inventory.txt
target1 | SUCCESS => {
“ansible_facts”: {
“discovered_interpreter_python”: “/usr/bin/python”
“changed”: false,
“ping”: “pong”
Please help.


Never mind, I found the solution :slight_smile: