postgresql_db for Windows?

61 views
Skip to first unread message

zil...@gmail.com

unread,
Jun 15, 2021, 7:39:06 AM6/15/21
to Ansible Project
Is there an equivalent Windows module for postgresql_db in Windows that I can use to dump/restore a PostgreSQL DB?

Thanks,
Chris

Wei-Yen Tan

unread,
Jun 15, 2021, 7:45:16 AM6/15/21
to ansible...@googlegroups.com
No. But the commands on linux should be able to reach out to a remote host. Can you delegate locally and reach out to remote windows host? 
https://docs.ansible.com/ansible/latest/collections/community/postgresql/postgresql_db_module.html#ansible-collections-community-postgresql-postgresql-db-module
There is an proc there to specify a login host. That's the host running the database. 



From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of zil...@gmail.com <zil...@gmail.com>
Sent: Tuesday, June 15, 2021 11:39:06 PM
To: Ansible Project <ansible...@googlegroups.com>
Subject: [ansible-project] postgresql_db for Windows?
 
Is there an equivalent Windows module for postgresql_db in Windows that I can use to dump/restore a PostgreSQL DB?

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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cddc76b8-5d86-4be9-a3d0-acefcba45c8an%40googlegroups.com.

Wei-Yen Tan

unread,
Jun 15, 2021, 7:51:19 AM6/15/21
to ansible...@googlegroups.com
I Should say option 

From: Wei-Yen Tan <weiye...@gmail.com>
Sent: Tuesday, June 15, 2021 11:44:52 PM
To: ansible...@googlegroups.com <ansible...@googlegroups.com>
Subject: Re: [ansible-project] postgresql_db for Windows?
 

zil...@gmail.com

unread,
Jun 15, 2021, 8:46:40 AM6/15/21
to Ansible Project
Thanks. I've seen that link before, but the page does not provide an example that uses "login_host"? Is just the hostname, or IP address, or the host running the DB? What about the PostgreSQL cred and connection URL? I don't see them in the module?

Thanks,
Chris

Wei-Yen Tan

unread,
Jun 15, 2021, 8:53:05 AM6/15/21
to ansible...@googlegroups.com
Googling around I found this example:


looks like name is what you are looking for

- postgresql_db: name=module_test
                 state=present
                 login_host=db.example.com
                 port=5432
                 login_user=postgres

Sent: Wednesday, June 16, 2021 12:46:40 AM
To: Ansible Project <ansible...@googlegroups.com>

Subject: Re: [ansible-project] postgresql_db for Windows?

zil...@gmail.com

unread,
Jun 15, 2021, 9:23:40 AM6/15/21
to Ansible Project
Thanks again. I'll try it later and post here.

Chris
Reply all
Reply to author
Forward
0 new messages