geerlingguy / docker-ubuntu2204-ansible

Ubuntu 22.04 LTS (Jammy Jellyfish) Docker container for Ansible playbook and role testing.
https://hub.docker.com/r/geerlingguy/docker-ubuntu2204-ansible
MIT License
69 stars 17 forks source link

Add non-privileged user #5

Open dominik-horb-umg opened 2 years ago

dominik-horb-umg commented 2 years ago

Would you consider adding the possibility of running as a non-privileged user to the image as described in the molecule docs?

https://molecule.readthedocs.io/en/latest/examples.html#docker-with-non-privileged-user

I'd be happy to contribute this change instead of forking, if you think it would be a good addition.

geerlingguy commented 2 years ago

For my own workflows, I use these images just to test the basic functionality of the Ansible roles and playbooks I'm using, and don't test out things like permissions/become/etc., so I don't have a need for it...

However, I would be willing to add this on (since it doesn't seem to break anything by default), but only if I were able to get it added to all my various docker-*-ansible images so they're on feature parity. But if you work on a PR for this one, I may be able to just copy and paste across the rest.

dominik-horb-umg commented 2 years ago

Thanks for the quick answer. That sounds good to me, I should be able to get to this next week.

dominik-horb-umg commented 2 years ago

Let me know whether I should open the other PRs as well after you had time to review the changes here or if it's easier for you to do the changes yourself.