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

Revoke sudo permissions #11

Merged
merged 4 commits into from
Oct 25, 2023
Merged

Revoke sudo permissions #11

merged 4 commits into from
Oct 25, 2023

Conversation

andyundso
Copy link
Contributor

The role is currently not able to revoke sudo permissions for users. With this PR, this is added. The first commit adds a failing test, while the second one includes the actual implementation.

I'm personally a bit disappointed that Ansible does not have any nice native tools to remove groups on a user. Using command to retrieve groups, and then transforming the resulting output feels very hacky. I made a couple of tries with getent, but it ended up in a nightmare of Jinja transformations.

@andyundso andyundso requested a review from Zinggi October 17, 2023 16:02
tasks/main.yml Show resolved Hide resolved
tasks/revoke-sudo.yml Outdated Show resolved Hide resolved
@andyundso andyundso requested a review from Zinggi October 24, 2023 07:10
Copy link
Member

@Zinggi Zinggi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done 👍

@andyundso andyundso merged commit a2b26e2 into main Oct 25, 2023
24 checks passed
@andyundso andyundso deleted the revoke-sudo branch October 25, 2023 14:10
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

Successfully merging this pull request may close these issues.

2 participants