I'm using Ansible to install Postgres 13 on a Windows 2019 machine. I downloaded the binaries from here and unzipped it to C:\PostgreSQL\13\pgsql, and added the path to the system path, all via Ansible tasks. I then have an Ansible task that does

initdb -D I:\PostgreSQL\13\DATA -U postgres -E UTF8

and it fails, with the only error being a non-zero return code

So to test, I launch Windows Powershell and enter initdb -V, I get nothing - no error, no feedback, NOTHING! Adding the -d (debug) option does nothing.

I've even downloaded the zip file manually and re-unzipped to no avail. What the hell is going on?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.