# etcd configuration for Patroni cluster # Node: {{ inventory_hostname }} name: '{{ inventory_hostname }}' data-dir: /var/lib/etcd # Cluster communication initial-advertise-peer-urls: http://{{ nebula_ip }}:2380 listen-peer-urls: http://{{ nebula_ip }}:2380 listen-client-urls: http://{{ nebula_ip }}:2379,http://127.0.0.1:2379 advertise-client-urls: http://{{ nebula_ip }}:2379 # Cluster bootstrap initial-cluster-token: 'patroni-etcd-cluster' initial-cluster: {% for host in groups['postgres'] %}{{ host }}=http://{{ hostvars[host]['nebula_ip'] }}:2380{% if not loop.last %},{% endif %}{% endfor %} initial-cluster-state: 'new' # Performance tuning heartbeat-interval: 1000 election-timeout: 5000