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

On Wednesday, June 23, 2021 at 11:35:53 AM UTC-4 [email protected] wrote:

> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/fd31a845-e02e-4fea-807d-04a274ab6e4dn%40googlegroups.com.

Reply via email to