Foreman - ansible ssh permission denied

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

1:

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

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

7: PLAY RECAP *********************************************************************
8: host2.example.com : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
9:

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!