community.postgresql
community.postgresql copied to clipboard
feat: ability to alter database-level default privs
Now omitting of param 'schema' for default_privs means altering database-level default privs (they will be applied to new objects in any schema).
SUMMARY
I'd tried to set up database-level default privileges by community.postgresql.postgresql_privs module. But it's not possible even without param 'schema'. My changes make it possible: with defined schema privs are altered for this schema, without - privs are altered for entire database (pg_default_acl.defaclnamespace = 0) and will be applied to any new created schema and its inner objects.
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION
@st-rafer hi, thanks for the PR! I have no time to review it this week and will try to do it at the beginning of the next week. For now:
- Be sure your PR does not introduce any breaking changes
- Please add a changelog fragment https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment
- Add integration tests for your changes, see the content of tests/integration/targets/postgresql_privs
Thoughts on the change from our other contributors would be much appreciated. CC @hunleyd @tcraxs @klando @kostiantyn-nemchenko @MichaelDBA @marcosdiez (if anyone doesn't want me mentioning them, let me know)
lgtm with a quick scan. will do an actual review once the tests are added
Thanks guys, ansible tests and changelog fragments are unfamiliar to me, I will try to sort it out during this week.
@hunleyd thanks! Sounds good, will do the same. @st-rafer cool, thanks! In addition to the mentioned part of the source code, you could use https://github.com/ansible/community-docs/blob/main/integration_tests_quick_start_guide.rst.
@st-rafer hi, is there a way we can help here?