-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 support for setenv parameters #5883
Conversation
cc @JonEllis @JonEllis0 |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I've added some first comments. Can you please add a changelog fragment? Thanks.
Just added the changelog fragment and updated my code with your suggestions |
changelogs/fragments/5883-sudoers-add-support-for-setenv-parameter.yml
Outdated
Show resolved
Hide resolved
Should be all good now, sorry for the small hiccups regarding changelog, I'll now best for the next time ! |
No worries! Looks good to me. If nobody objects, I'll merge beginning of next week. It would be nice if you could also add a test for this option, though. You can find the existing tests in tests/integration/targets/sudoers/tasks/main.yml. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from my side
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #5920 🤖 @patchback |
(cherry picked from commit dcc3d4f)
@redat00 thanks for your contribution! |
…ers (#5920) Add support for setenv parameters (#5883) (cherry picked from commit dcc3d4f) Co-authored-by: Renaud <[email protected]>
SUMMARY
During the configuration of sudo rights regarding a Python app I created, I needed to allow my user to keep their environments variables while running it. This can be done by using
sudo -E [command to run]
.To allow this in our sudoers files we need to pass a parameters. However while the sudoers modules allowed to pass nopasswd, it did not allowed to pass the
setenv
parameters. This PR aims to allow it.ISSUE TYPE
COMPONENT NAME
sudoers
ADDITIONAL INFORMATION