64 lines
1.5 KiB
Django/Jinja
64 lines
1.5 KiB
Django/Jinja
scope: postgres-cluster
|
|
name: {{ inventory_hostname }}
|
|
|
|
restapi:
|
|
listen: {{ nebula_ip }}:8008
|
|
connect_address: {{ nebula_ip }}:8008
|
|
|
|
etcd3:
|
|
hosts: {% for host in groups['postgres'] %}{{ hostvars[host]['nebula_ip'] }}:2379{% if not loop.last %},{% endif %}{% endfor %}
|
|
|
|
|
|
bootstrap:
|
|
dcs:
|
|
ttl: 30
|
|
loop_wait: 10
|
|
retry_timeout: 10
|
|
maximum_lag_on_failover: 1048576
|
|
postgresql:
|
|
use_pg_rewind: true
|
|
use_slots: true
|
|
parameters:
|
|
wal_level: replica
|
|
hot_standby: "on"
|
|
max_connections: 200
|
|
max_worker_processes: 8
|
|
max_wal_senders: 10
|
|
max_replication_slots: 10
|
|
hot_standby_feedback: "on"
|
|
wal_log_hints: "on"
|
|
listen_addresses: '*'
|
|
|
|
initdb:
|
|
- encoding: UTF8
|
|
- data-checksums
|
|
- locale: C
|
|
|
|
pg_hba:
|
|
- host replication replicator 10.10.10.0/24 md5
|
|
- host all all 10.10.10.0/24 md5
|
|
- host all all 127.0.0.1/32 md5
|
|
- local all all trust
|
|
|
|
postgresql:
|
|
listen: {{ nebula_ip }}:5432
|
|
connect_address: {{ nebula_ip }}:5432
|
|
data_dir: /var/lib/postgres/data
|
|
bin_dir: /usr/bin
|
|
pgpass: /var/lib/postgres/.pgpass
|
|
authentication:
|
|
replication:
|
|
username: replicator
|
|
password: {{ patroni_replicator_password }}
|
|
superuser:
|
|
username: postgres
|
|
password: {{ patroni_superuser_password }}
|
|
parameters:
|
|
unix_socket_directories: '/run/postgresql'
|
|
|
|
tags:
|
|
nofailover: false
|
|
noloadbalance: false
|
|
clonefrom: false
|
|
nosync: false
|