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 change postgres password #48

Closed varmaraju closed 5 years ago

varmaraju commented 5 years ago

My Client is asking if we want to change the postgress password via this role?. how can we change the password. while the the first time, then only we can set the password, If I change the password and re run the this role, we are not able to change the potgress password.

kostiantyn-nemchenko commented 5 years ago

https://github.com/kostiantyn-nemchenko/ansible-role-patroni/issues/47#issuecomment-451647514

I would suggest trying the following scenario: 1) put patroni into the maintenance mode; 2) change password via ALTER ROLE statement; 3) redeploy this role with new password for postgres user; 4) resume the maintenance mode.