kostiantyn-nemchenko / ansible-role-patroni

:elephant: Ansible Role for Patroni
https://galaxy.ansible.com/kostiantyn-nemchenko/patroni
MIT License
68 stars 44 forks source link

How to connect postgres user from remote #47

Closed varmaraju closed 5 years ago

varmaraju commented 5 years ago

Hi Sir, May I know how can I assign password for postgres user, like below.

Inside the psql shell you can give the DB user postgres a password:

ALTER USER postgres PASSWORD 'newPassword';

Via patroni role how can I do that ?

kostiantyn-nemchenko commented 5 years ago

Which variable of the role do you use to configure pg_hba.conf file? Just add the correct rule there to allow remote connections from the desired remote host.

varmaraju commented 5 years ago

Thank you sir, your response, I understand that, Then May I know how can I assign password for postgres user, like below.

Inside the psql shell you can give the DB user postgres a password:

ALTER USER postgres PASSWORD 'newPassword';

Via patroni role how can I do that ?

kostiantyn-nemchenko commented 5 years ago

ALTER USER postgres PASSWORD 'newPassword';

AFAIK patroni does not support changing user's password once it has been set during post bootstrap stage. Use this variable to populate the initial set of database users/roles along with their passwords and attributes.

varmaraju commented 5 years ago

Thank you for your response.