I'm trying to automate some of my personal server setup using Ansible, in order to wipe my disk clean and migrate to Ubuntu 20.04. Part of this process is installing the SSH keys I use for Github access.
The SSH public/secret keys are stored in pass
, and I'm able to get those copied over to ~/.ssh/github.pub
and ~/.ssh/github
just fine. But at this point I'm stuck: if I were doing this by hand, I'd run eval $(ssh-agent -s)
to set environment variables, and then run ssh-add ~/.ssh/github
. I'm not sure how to accomplish this with Ansible. Searching for Ansible and anything involving SSH produces a lot of results with setting up remote access for Ansible to run on external hosts, and doesn't seem like it'd help in this use case.
0 Answers