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

postgresql_membership: add the exact state value to be able to specify a list of only groups a user must be a member of #293

Merged
merged 3 commits into from
Jun 21, 2022

Conversation

Andersson007
Copy link
Collaborator

@Andersson007 Andersson007 commented Jun 17, 2022

SUMMARY

Fixes #277

ISSUE TYPE
  • Feature Pull Request

@Andersson007
Copy link
Collaborator Author

Andersson007 commented Jun 17, 2022

@hunleyd @Vanav @jchancojr how about (at least) the interface implementation?
when we pass:

postgresql_membership:
  groups: []
  state: exact
  user: blah

it'll revoke all groups from a user (i.e. all not listed under groups).

Resp if we pass

postgresql_membership:
  groups:
    - group1
    - group2
  state: exact
  user: blah

group1 and group2 will be granted to blah if he's already not in them and all other groups will be revoked.

i'll be polishing the implementation and the question now is about the interface

@Vanav
Copy link

Vanav commented Jun 17, 2022

Looks good, thank you!

@hunleyd
Copy link
Collaborator

hunleyd commented Jun 17, 2022

LGTM

@Andersson007 Andersson007 changed the title [WIP] postgresql_membership: add the exact state value to be able to specify a list of only groups a user must be a member of postgresql_membership: add the exact state value to be able to specify a list of only groups a user must be a member of Jun 20, 2022
@Andersson007
Copy link
Collaborator Author

Ready for review folks.
This time I'll ask to take a look at the code changes please

@Andersson007 Andersson007 merged commit 3d6d9a7 into ansible-collections:main Jun 21, 2022
@Andersson007
Copy link
Collaborator Author

@hunleyd @Vanav thanks for reviewing!

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.

Ability to specify exact list of groups for user (and revoke user from any other groups)
3 participants