Skip to content

Conversation

@Andersson007
Copy link
Collaborator

@Andersson007 Andersson007 commented Aug 26, 2022

SUMMARY

Fixes #332
Fixes #333

Test task 332 executes the following queries:

ALTER DEFAULT PRIVILEGES REVOKE ALL ON SCHEMAS FROM \"ansible_db_user3\";
ALTER DEFAULT PRIVILEGES GRANT USAGE ON SCHEMAS TO \"ansible_db_user3\"

Test task 333 executes the following:

ALTER DEFAULT PRIVILEGES REVOKE ALL ON TABLES FROM \"ansible_db_user3\"
ALTER DEFAULT PRIVILEGES GRANT SELECT ON TABLES TO \"ansible_db_user3\"

Is it OK?

not-specified is introduced to preserve backwards compatibility, we can change it as a default in a later major release if needed.

ISSUE TYPE
  • Bugfix Pull Request

@Andersson007
Copy link
Collaborator Author

Andersson007 commented Aug 26, 2022

@caseyandgina @hunleyd could you take a look? (if you click the gear in review mode and then click "Hide whitespaces", it'll make the review easier)

if you're OK with the implementation,

@caseyandgina could you please thoroughly test these changes on your test infra? (you can just replace your current module file with the file from my PR)

Despite passing our CI, i won't merge this w/o manual testing (I'm not a DBA).

@hunleyd maybe your folks also could help with testing this?

@hunleyd
Copy link
Collaborator

hunleyd commented Aug 28, 2022

this looks ok. will test soon

@Andersson007
Copy link
Collaborator Author

this looks ok. will test soon

@hunleyd thanks, I'll be waiting for your feedback!

@Andersson007
Copy link
Collaborator Author

Andersson007 commented Aug 29, 2022

@caseyandgina if you take part in testing I asked for in my previous message, it'd be much appreciated as we're touching very important module.

@Andersson007
Copy link
Collaborator Author

cc @caseyandgina ^

@caseyandgina
Copy link

@Andersson007 I'm sorry but I really don't know how to test as I'm not a developer. I'll need some guidance on how to do this. I have been meaning to talk to some colleagues who have more experience with Ansible, but we've been extremely busy at work lately.

@Andersson007
Copy link
Collaborator Author

@caseyandgina sorry for the late reply, was in a business trip, you can test in simply by:

  1. finding the location of plugins/modules/postgresql_privs.py in your test system (copy it somewhere)
  2. replacing it with the file from this PR, i.e. with this one
  3. running the tasks you had issues with before replacing
  4. after finishing the tests, you can move the original file back

If you have any questions, feel free to ask
Thank you

@Andersson007 Andersson007 reopened this Oct 18, 2022
@Andersson007 Andersson007 merged commit eed4e1f into ansible-collections:main Oct 18, 2022
@Andersson007
Copy link
Collaborator Author

@hunleyd @caseyandgina thanks for reviewing!

patchback bot pushed a commit that referenced this pull request Oct 18, 2022
…e on schemas (#335)

* postgresql_privs: grant usage on schemas

* issue 332

* add changelog fragment

* issue 333

* update changelog and documentation

* Fix

(cherry picked from commit eed4e1f)
@ansible-collections ansible-collections deleted a comment from patchback bot Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants