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

Fix chef_org admin idempotency #240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bkonick
Copy link
Contributor

@bkonick bkonick commented Jul 6, 2019

Description

This fixes idempotency for admins in the chef_org resource. It uses knife show to get the list of users in the admin group for a given org.

Check List

Signed-off-by: Ben Konick <bkonick@cargurus.com>
@@ -58,11 +58,17 @@
end
end

# TODO: fix idempotency for org admins
org_admins = JSON.parse(
Copy link
Contributor

Choose a reason for hiding this comment

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

This really shouldn't be done by parsing knife. That's going to be super problematic and brittle. You'll want to hit the server API directly and parse out that output from there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough. I was sort of following the pattern of parsing output in some other parts of the same resource but I'll rework it to hit the API.

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.

None yet

2 participants