Hello ,
I also checked below code
- name: Replace postgresql configuration file to allow remote
connection
ansible.builtin.lineinfile:
path: "{{ postgresql_conf_file }}"
line: '{{ item }}'
owner: postgres
group: postgres
mode: '0644'
with_items:
- "listen_addresses = '*'"
- "port = 5432"
become: yes
become_user: root
- name: "Allow md5 connection for the db user"
postgresql_pg_hba:
dest: "{{ pg_hba_file}}"
contype: host
databases: all
source: "0.0.0.0/0"
method: md5
users: "all"
create: true
become: yes
become_user: root
I hope it will help you..!
Regards,
Ajay
On Fri, Aug 26, 2022 at 6:14 PM Sagan <[email protected]> wrote:
> Hello,
>
> I'm trying to automatize the editing of these files. I have made a
> playbook to install PostgreSQL in a controlled node. However, I need to
> change these 2 files to accept remote connections so I can access the
> PostgreSQL databases with my PGadmin4.
>
> However, I can't seem to find how to change the configuration on these
> files. Is there a module for this? It seems weird that no module can do it.
> So I'm sure I've missed something.
>
> Any advice would be greatly welcomed!
>
> --
> 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/26d962cf-e8e2-436f-b06d-97e290103354n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/26d962cf-e8e2-436f-b06d-97e290103354n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
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/CAERHs47-kRdu4TjzHW49eFOvtJH84zpaLYiK1gUAajPCwnyG4Q%40mail.gmail.com.