Foreman - ansible ssh permission denied

Hi I am trying to run ansible role thro foreman and get the below error,


2: PLAY [all] *********************************************************************

4: TASK [Gathering Facts] *********************************************************
5: fatal: []: UNREACHABLE! => {“changed”: false, “msg”: “Failed to connect to the host via ssh: Warning: Permanently added ‘,’ (ECDSA) to the list of known hosts.\r\nPermission denied (publickey,password).”, “unreachable”: true}

7: PLAY RECAP *********************************************************************
8: : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0

10: Exit status: 4

host 2 was not provisioned through foreman but added to All Hosts manually. If we provision the host through foreman, we dont get this error. I also tried ssh host2 one time from foreman host but that didnt helped.

The target host does not have authorized_keys configured properly. See Foreman :: Plugin Manuals

Thanks it helped!