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

Allow to add nexus user to additional groups #142

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

jeremy-clerc
Copy link
Contributor

This will allow to provide a license file to be used by different instances or a single one without the need to manage it directly in the nexus cookbook.

@jeremy-clerc jeremy-clerc force-pushed the shared_group branch 2 times, most recently from dd7af15 to d719fe4 Compare February 5, 2024 13:22
@jeremy-clerc jeremy-clerc requested a review from a team February 5, 2024 13:35
new_resource.nexus3_additional_groups.to_a.each do |gr|
group "add #{new_resource.nexus3_user} user to #{gr} group" do
group_name gr
action :manage
Copy link
Contributor

Choose a reason for hiding this comment

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

OPT: Use :modify instead to have Chef fail if the group does not exist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure we want to fail, that's why I used manage in the first place, but yeah I am divided between it will show there is an issue and does it matter ?
And it is like I just want to "manage" members, not really modify the group more than that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also I did not want any modification to the group attributes like gid, but yes the code is just about fail if it exists or not 😞
So updated to modify

This will allow to provide a license file to be used by
different instances or a single one without the need
to manage it directly in the nexus cookbook.
@jeremy-clerc jeremy-clerc merged commit 480d2d5 into master Feb 6, 2024
5 checks passed
@jeremy-clerc jeremy-clerc deleted the shared_group branch February 6, 2024 07:26
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