Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pgsql backend #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add pgsql backend #104

wants to merge 1 commit into from

Conversation

commonism
Copy link

@commonism commonism commented Aug 12, 2021

the changes require the postgres user to be able to connec to the database via localhost using password, peer authentication would require using become.
This may require changes to pg_hba.conf and setting a postgres user password:

- name: PostgreSQL | pg_hba.conf
  community.postgresql.postgresql_pg_hba:
    dest: /etc/postgresql/13/main/pg_hba.conf
    contype: host
    users: postgres
    source: "{{item}}"
    databases: ALL
    method: md5
    create: true  
  loop: ["::1/128","127.0.0.1/32"]

- name: PostgreSQL | postgres password
  become: yes
  become_user: postgres
  community.postgresql.postgresql_user:
    user: postgres
    password: "{{ pgsql_root_password }}"
    login_unix_socket: /var/run/postgresql

@pieterlexis
Copy link
Contributor

Sweet! If you could add some tests, I'll happily merge it :)

@lessfoobar
Copy link

when will that be merged?

@Exchizz
Copy link

Exchizz commented Apr 1, 2024

I've created a new PR that includes these changes and some tests.

#211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants