willhallonline / docker-ansible

Ansible inside Docker containers: Alpine, Ubuntu, Rocky & Debian with Ansible 2.16, 2.15, 2.14, 2.13, 2.12, 2.11, 2.10 and 2.9 + Mitogen
https://www.willhallonline.co.uk/project/docker/docker-ansible/
MIT License
392 stars 137 forks source link

Possibly wrong ssh key path in example commands #76

Closed EdyTheCow closed 1 month ago

EdyTheCow commented 7 months ago

I've been testing this image using the example commands provided in the readme here https://github.com/willhallonline/docker-ansible?tab=readme-ov-file#mount-local-directory-and-ssh-key

I noticed this path to private key may be wrong ~/.ssh/id_rsa:/root/id_rsa, the aliases examples use ~/.ssh/id_rsa:/root/.ssh/id_rsa which include the dir .ssh. Not sure if this is done on purpose or if it's a mistake.

willhallonline commented 1 month ago

I think this is just an example for if your current user (whose directory is denoted by ~) is using both a .ssh directory inside their user and linking it to the root user (probably the user in the container). I would suggest that you make this appropriate to you. In fact, from a personal level I'm not using rsa keys any more, but realise that when I did this it was the industry standard.