Ansible ssh-agent check

25 views
Skip to first unread message

Neil Young

unread,
Dec 10, 2021, 5:44:47 AM12/10/21
to Ansible Project
Hi,

I'm using the ssh-agent in order to make Ansible aware of my identity during the setup. Unfortunately I mostly forget to run 

"ssh-add ~/.ssh/id_rsa"

before starting lengthy installations, so at some point later for instance a "git clone" fails because auf authentication problems.

Is there a chance to run "ssh-add -l" locally before running the full installation in order to see, if the ssh agent is properly configured?


Neil Young

unread,
Dec 10, 2021, 3:48:33 PM12/10/21
to Ansible Project
- name: Configure SSH agent
delegate_to: localhost
shell: |
ssh-add ~/.ssh/id_rsa

Thanks
Reply all
Reply to author
Forward
0 new messages