From 12dd3933ccded16b932e1bafa8bed3f48a30aa5a Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Sun, 23 Jan 2022 22:55:23 +0100 Subject: [PATCH] copr: automatically restart frontend httpd after failure --- roles/copr/frontend/tasks/httpd.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/copr/frontend/tasks/httpd.yml b/roles/copr/frontend/tasks/httpd.yml index be2699979b..2d219e4f5e 100644 --- a/roles/copr/frontend/tasks/httpd.yml +++ b/roles/copr/frontend/tasks/httpd.yml @@ -91,6 +91,18 @@ backup: yes notify: restart apache +- name: When httpd is OOM killed or otherwise failed, start it again + ini_file: + path: /usr/lib/systemd/system/httpd.service + section: Service + option: "{{ item.option }}" + value: "{{ item.value }}" + backup: yes + with_items: + - { option: "Restart", value: "on-failure" } + - { option: "RestartSec", value: "5s" } + notify: restart apache + - include_role: name: keytab/service vars: