From c487c8c3879654275528feb0e8a47e1cdbc1ce17 Mon Sep 17 00:00:00 2001 From: Anatoliy Tishaninov Date: Tue, 11 Jul 2023 21:46:39 +0200 Subject: [PATCH] fix deprecated pidfile path warning Signed-off-by: Anatoliy Tishaninov --- roles/alertmanager/templates/alertmanager.service.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/alertmanager/templates/alertmanager.service.j2 b/roles/alertmanager/templates/alertmanager.service.j2 index 9499c3551..32710bce9 100644 --- a/roles/alertmanager/templates/alertmanager.service.j2 +++ b/roles/alertmanager/templates/alertmanager.service.j2 @@ -17,7 +17,11 @@ StartLimitIntervalSec=0 [Service] Type=simple +{% if (ansible_facts.packages.systemd | first).version is version('239', '>=') %} +PIDFile=/run/alertmanager.pid +{% else %} PIDFile=/var/run/alertmanager.pid +{% endif %} User=alertmanager Group=alertmanager ExecReload=/bin/kill -HUP $MAINPID