Add template systemd for patroni
This commit is contained in:
parent
d8e31ef297
commit
e27f0aa406
|
@ -16,3 +16,11 @@
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
|
- mane: Create Systemd Unit for Patroni
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: patroni.service.j2
|
||||||
|
dest: /etc/systemd/system/patroni.service
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
|
17
patroni/templates/patroni.service.j2
Normal file
17
patroni/templates/patroni.service.j2
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runners to orchestrate a high-availability PostgreSQL
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
|
||||||
|
User=postgres
|
||||||
|
Group=postgres
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/patroni /etc/patroni/config-{{ cluster_name }}.yml
|
||||||
|
KillMode=process
|
||||||
|
TimeoutSec=30
|
||||||
|
Restart=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.targ
|
Loading…
Reference in a new issue