Only after ensuring the SSH agen’t directory is in ~/.ssh, additionally adding an enviroment variable to Runner, and bind-mounting the hosts .ssh directory do I succeed:
$ eval $(ssh-agent -a ~/.ssh/auth-sock)
$ ssh-add my.key
Identity added: my.id_rsa (Ansible user)
$ echo 'SSH_AUTH_SOCK: "/root/.ssh/auth-sock"' > env/envvars # the EE will get this
$ ansible-runner run . --container-volume-mount $HOME/.ssh/:/root/.ssh/ -p test_remote.yml
PLAY [Gather and print facts] **************************************************
TASK [Gathering Facts] *********************************************************
ok: [YOUR_INVENTORY_HOST]
...
I don’t know what this is due to, as the documentation clearly says the SSH directory will be bind-mounted, but this doesn’t occur here, which may be due to all sorts of reasons.
@jpmens thank you for the feedback!
I did it for ansible-navigator. Sorry for not specifying this which could cause some confusion: now mentioned it explicitly in the title.
Didn’t play with runner yet. I think they would appreciate any docfixes with things you discovered.