Add automatic restart for memcached

This patch ensures that systemd will restart memcached in case of
failure or if the process is manually killed.

Closes-Bug: 1659954
Change-Id: I6782320bf429cde17dff00401e7f136cfc979cee
(cherry picked from commit 4ec27e6874)
This commit is contained in:
Major Hayden 2017-08-17 11:42:31 -05:00
parent 8a644cd539
commit 53e845e54e
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
2 changed files with 12 additions and 0 deletions

View File

@ -61,6 +61,14 @@
- ansible_service_mgr == 'systemd'
notify: Restart memcached
- name: Add automatic restart on failure
template:
src: systemd-restart-on-failure.conf.j2
dest: "/etc/systemd/system/memcached.service.d/systemd-restart-on-failure.conf"
when:
- ansible_service_mgr == 'systemd'
notify: Restart memcached
- name: Apply resource limits (systemd)
template:
src: "limits.conf.j2"

View File

@ -0,0 +1,4 @@
# {{ ansible_managed }}
[Service]
Restart=on-failure
RestartSec=2