Add RestartSec to koschei units

This commit is contained in:
Michael Simacek 2017-07-03 10:49:02 +02:00
parent c626ee2f10
commit d56fccc170
2 changed files with 19 additions and 1 deletions

View file

@ -22,7 +22,7 @@
- config
- service
- name: install systemd config files
- name: install systemd config files (memory)
copy: >
src=systemd-memory-limit.conf
dest=/etc/systemd/system/{{ item }}.service.d/memory-limit.conf
@ -38,6 +38,18 @@
- config
- 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
template: >
src="{{ item }}.j2"

View file

@ -0,0 +1,6 @@
[Service]
{% if env == 'staging' %}
RestartSec=600
{% else %}
RestartSec=10
{% endif %}