Commit 3f4ed34f authored by Илья Крылов's avatar Илья Крылов
Browse files

1.0.1: patroni_service_restart

parent 9881fc9f
......@@ -38,6 +38,8 @@ patroni_superuser_password: supersecretpostgrespasswd
patroni_postgresql_version: 12
patroni_exec_start_pre: '/bin/mkdir -m 2750 -p /var/run/postgresql/{{ patroni_postgresql_version }}-main.pg_stat_tmp'
patroni_service_restart: on-failure # no, always, on-success, on-failure, on-abnormal, on-abort, on-watchdog
# https://patroni.readthedocs.io/en/latest/SETTINGS.html#rest-api
patroni_restapi_listen: 0.0.0.0:8008
patroni_restapi_connect_address: '{{ ansible_host }}:8008'
......
......@@ -24,8 +24,8 @@ KillMode=process
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=30
# Do not restart the service if it crashes, we want to manually inspect database on failure
Restart=no
# Restart policy
Restart={{ patroni_service_restart }}
[Install]
WantedBy=multi-user.target
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