From e688a716a60486a2a19e27817eb7f3782286b809 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Tue, 7 Jan 2020 22:19:58 +0000 Subject: [PATCH] try to make this logic so much shorter --- .../templates/check_fedmsg_gateway_proc.cfg.j2 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/roles/nagios_client/templates/check_fedmsg_gateway_proc.cfg.j2 b/roles/nagios_client/templates/check_fedmsg_gateway_proc.cfg.j2 index 19596dd864..d7e79ee5d9 100644 --- a/roles/nagios_client/templates/check_fedmsg_gateway_proc.cfg.j2 +++ b/roles/nagios_client/templates/check_fedmsg_gateway_proc.cfg.j2 @@ -1,10 +1,4 @@ -{% if ansible_distribution_major_version == "7" and ansible_distribution is "RedHat" %} -command[check_fedmsg_gateway_proc]={{ libdir }}/nagios/plugins/check_procs -c 1:1 -C 'fedmsg-gateway' -u fedmsg -{% elif ansible_distribution_major_version|int < 30 and ansible_distribution is "Fedora" %} -command[check_fedmsg_gateway_proc]={{ libdir }}/nagios/plugins/check_procs -c 1:1 -C 'fedmsg-gateway' -u fedmsg -{% elif ansible_distribution_major_version == "8" and ansible_distribution is "RedHat" %} -command[check_fedmsg_gateway_proc]={{ libdir }}/nagios/plugins/check_procs -c 1:1 -C 'fedmsg-gateway-3' -u fedmsg -{% elif ansible_distribution_major_version|int >= 30 and ansible_distribution is "Fedora" %} +{% if (( ansible_distribution_major_version == "8" ) and ( ansible_distribution is "RedHat" )) or ((ansible_distribution_major_version|int >= 30) and (ansible_distribution is "Fedora")) %} command[check_fedmsg_gateway_proc]={{ libdir }}/nagios/plugins/check_procs -c 1:1 -C 'fedmsg-gateway-3' -u fedmsg {% else %} command[check_fedmsg_gateway_proc]={{ libdir }}/nagios/plugins/check_procs -c 1:1 -C 'fedmsg-gateway' -u fedmsg