Test PostgreSQL user access in Windows?

Ansible v2.11.x

I did all the following via Ansible.

Sadly I don’t think there are Windows-equivalent postgres modules. So for windows, I’ve installed the PostgreSQL binaries from https://www.enterprisedb.com/download-postgresql-binaries, and on initial setup, set up access for user “postgres” as “trusted” so I don’t have to setup a password.

But now I ran a script that sets user “postgres” password, and set the authentication to “md5.” What’s the best way to now test user “postgres” access that hides the password when the Ansible task runs? I do have the password in a vault.

Thanks,
Chris