Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add non-root user to the image? #20

Open
natemarks opened this issue Oct 4, 2021 · 1 comment
Open

Add non-root user to the image? #20

natemarks opened this issue Oct 4, 2021 · 1 comment

Comments

@natemarks
Copy link

I was looking at this exapmpe. I can fork and PR if you want.
https://molecule.readthedocs.io/en/latest/examples.html

# Create ansibleuser with sudo permissions and membership inDEPLOY_GROUP ENV ANSIBLE_USER=ansible SUDO_GROUP=sudo DEPLOY_GROUP=deployer RUN set -xe \ && groupadd -r ${ANSIBLE_USER} \ && groupadd -r ${DEPLOY_GROUP} \ && useradd -m -g ${ANSIBLE_USER} ${ANSIBLE_USER} \ && usermod -aG ${SUDO_GROUP} ${ANSIBLE_USER} \ && usermod -aG ${DEPLOY_GROUP} ${ANSIBLE_USER} \ && sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@natemarks and others