Skip to content

Comments

Fix chef_org admin idempotency#240

Open
bkonick wants to merge 1 commit intochef-cookbooks:mainfrom
bkonick:chef_org
Open

Fix chef_org admin idempotency#240
bkonick wants to merge 1 commit intochef-cookbooks:mainfrom
bkonick:chef_org

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>
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.

2 participants