Commit eff8066b authored by Gabriel Mazetto's avatar Gabriel Mazetto 🕵🏻
Browse files

Patroni configuration saves replication password in supported format

We are not relying on `sql_replication_password` as we need it in cleartext here.
parent bafcce42
......@@ -15,6 +15,8 @@ default['patroni']['max_timelines_history'] = 0
default['patroni']['master_start_timeout'] = 300
default['patroni']['use_pg_rewind'] = false
default['patroni']['use_slots'] = true
default['patroni']['replication_user'] = node['postgresql']['sql_replication_user']
default['patroni']['replication_password'] = nil
default['patroni']['replication_slots'] = {}
 
# Standby cluster replication settings
......
......@@ -19,9 +19,9 @@ postgresql:
superuser:
username: <%= account_helper.postgresql_user %>
replication:
username: <%= @postgresql_defaults['sql_replication_user'] %>
<% if @postgresql_defaults['sql_replication_password'] %>
password: <%= "md5#{@postgresql_defaults['sql_replication_password']}" %>
username: <%= @replication_user %>
<% if @replication_password %>
password: <%= "#{@replication_password}" %>
<% end %>
bootstrap:
dcs: <%= patroni_helper.dynamic_settings.to_json %>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment