Not able to connect remote host via jenkins to run ansible playbook.I am able to run the playbook directly via the terminal but getting error when i do with jenkins getting below error.
fatal: [webservers]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ubuntu@<<ipaddress-masked>>: Permission denied (publickey).", "unreachable": true}
to retry, use: --limit @/etc/ansible/ansiblecopy.retry
I have masked the ipaddress
Jenkins and ansible server are on same machine