From 4f216b3d28ac0d3e6ff2dabab17cf830cde14699 Mon Sep 17 00:00:00 2001 From: Dincer Celik Date: Wed, 13 Nov 2019 15:26:08 +0300 Subject: [PATCH] Fixes the compatibility issue at HAProxy role with Ansible 2.9 Change-Id: I36b858b9b03005feabd77e7208674f37c820e9d4 Closes-Bug: #1852430 --- ansible/roles/haproxy/templates/haproxy_main.cfg.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/haproxy/templates/haproxy_main.cfg.j2 b/ansible/roles/haproxy/templates/haproxy_main.cfg.j2 index 6073f33815..4fa141783e 100644 --- a/ansible/roles/haproxy/templates/haproxy_main.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy_main.cfg.j2 @@ -7,7 +7,7 @@ global log {{ syslog_server }}:{{ syslog_udp_port }} {{ syslog_haproxy_facility }} maxconn {{ haproxy_max_connections }} nbproc {{ haproxy_processes }} - {% if haproxy_processes > 1 and haproxy_process_cpu_map | bool %} + {% if (haproxy_processes | int > 1) and (haproxy_process_cpu_map | bool) %} {% for cpu_idx in range(0, haproxy_processes) %} cpu-map {{ cpu_idx + 1 }} {{ cpu_idx }} {% endfor %}