Add RestartSec to koschei units
This commit is contained in:
parent
c626ee2f10
commit
d56fccc170
2 changed files with 19 additions and 1 deletions
|
@ -22,7 +22,7 @@
|
||||||
- config
|
- config
|
||||||
- service
|
- service
|
||||||
|
|
||||||
- name: install systemd config files
|
- name: install systemd config files (memory)
|
||||||
copy: >
|
copy: >
|
||||||
src=systemd-memory-limit.conf
|
src=systemd-memory-limit.conf
|
||||||
dest=/etc/systemd/system/{{ item }}.service.d/memory-limit.conf
|
dest=/etc/systemd/system/{{ item }}.service.d/memory-limit.conf
|
||||||
|
@ -38,6 +38,18 @@
|
||||||
- config
|
- config
|
||||||
- service
|
- service
|
||||||
|
|
||||||
|
- name: install systemd config files (restart)
|
||||||
|
template: >
|
||||||
|
src=systemd-restart.conf.j2
|
||||||
|
dest=/etc/systemd/system/{{ item }}.service.d/restart.conf
|
||||||
|
with_items: "{{ koschei_backend_services }}"
|
||||||
|
notify:
|
||||||
|
- reload systemd
|
||||||
|
tags:
|
||||||
|
- koschei
|
||||||
|
- config
|
||||||
|
- service
|
||||||
|
|
||||||
- name: install config files
|
- name: install config files
|
||||||
template: >
|
template: >
|
||||||
src="{{ item }}.j2"
|
src="{{ item }}.j2"
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[Service]
|
||||||
|
{% if env == 'staging' %}
|
||||||
|
RestartSec=600
|
||||||
|
{% else %}
|
||||||
|
RestartSec=10
|
||||||
|
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue