-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add support for alter default privileges grant usage on schemas to postgresql_privs #332
Comments
thanks for the report @caseyandgina . can you repro this w/ collection version 1.7.5 or 2.2.0? |
I looked at the current code here and confirmed that it's not supported yet: https://github.com/ansible-collections/community.postgresql/blob/main/plugins/modules/postgresql_privs.py#L465 Also note that just above that, USAGE is duplicated in VALID_PRIVS. |
@caseyandgina thanks for reporting the issue! |
Hi @Andersson007 - I am a DBA using Ansible to deploy database infrastructure, and unfortunately am not a developer nor able to work on this myself. |
@caseyandgina i reproduced the bug in CI, looking now |
After i made the changes from that PR, i get:
So the issue is deeper than it can seem. I guess that's why the original reporter and author dropped it. If i have free time later, i'll take a look but no promises |
@Andersson007 This is related to #333 - Currently the "schema" option is defaulted to 'public', and there seems to be no way to not specify a schema which is another big limitation as sometimes default privileges should be global to all schemas. Specifying a schema when granting/revoking on a schema is impossible hence the error you got. It would be better for this to default to all schemas if unspecified. |
To be clear, when not restricting a default privilege to specific schema(s), the "in schema ____" should not be present in the SQL. |
#335 was created some time ago, when it's tested, we can merge |
SUMMARY
I have encountered the same problem described on this closed issue:
ansible/ansible#63273
There was a patch made for it, but for whatever reason that merge request and the issue were closed and the problem still remains.
ISSUE TYPE
COMPONENT NAME
community.postgresql.postgresql_privs
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 20.04
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: