Run Postgres queries on a Windows target?

I’m aware that the postgres_* modules only run on Linux. Is there a way to run Postgres queries on a Windows target? For example, I want to CREATE DATABASE myDB

Thanks,
Chris

I just put my queries in a *.sql file, for example

create_db.sql
CREATE DATABASE myDB

and do

  • name: Create DB
    win_command: psql -U postgres -f create_db.sql