I have setup a job with a build step that triggers an ansible playbook.
This playbook will connect to a remote host and do a git pull on a github repository.
The ansible inventory is configured with an ssh key that can access the github repository, but unfortunately, the ssh key used by the playbook is not forwarded.
I confirm that , if I execute the ansible playbook manually on the Jenkins server, the key is forwarded.
I tried adding
environment variables in Global Tool configuration, but it is still not working.
The error returned by the ansible playbook in the console output is :
Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists."
Any help would be appreciated.