So I have an EC2 instance that has ansible and Jenkins on it. I'm trying to copy a few files from one host to another. I executed the ansible playbook which I've written specifically for this and it worked perfectly fine. But when I tried doing the same using Jenkins, It fails to give the following error:
fatal: [172.xx.xx.xx]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: no such identity: /home/ec2-user/.ssh/Host_Keypair.pem: Permission denied\r\nPermission denied (publickey).\r\n", "unreachable": true}
to retry, use: --limit @/var/lib/jenkins/workspace/Ansible/copy.retr