From 3f906e0c263df12489fa7c9bf06ed11481cb6656 Mon Sep 17 00:00:00 2001 From: Ansible Deployment User Date: Tue, 26 May 2020 13:18:03 +0200 Subject: [PATCH] rgwloadbalancer undefined index variable The vrrp_instances variable is using a loop with index but the index_var wasn't defined. As a result, the fact task was failing on this undefined index variable. The task includes an option with an undefined variable. The error was: 'index' is undefined Closes: #5395 Signed-off-by: Florian Faltermeier --- roles/ceph-rgw-loadbalancer/tasks/pre_requisite.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/ceph-rgw-loadbalancer/tasks/pre_requisite.yml b/roles/ceph-rgw-loadbalancer/tasks/pre_requisite.yml index 2772e41af..0a5ffd1eb 100644 --- a/roles/ceph-rgw-loadbalancer/tasks/pre_requisite.yml +++ b/roles/ceph-rgw-loadbalancer/tasks/pre_requisite.yml @@ -19,8 +19,10 @@ - name: set_fact vip to vrrp_instance set_fact: - vrrp_instances: "{{ vrrp_instances | default([]) | union([{ 'name': 'VI_' + index|string , 'vip': item }]) }}" + vrrp_instances: "{{ vrrp_instances | default([]) | union([{ 'name': 'VI_' + index|string , 'vip': item }]) }}" loop: "{{ virtual_ips | flatten(levels=1) }}" + loop_control: + index_var: index - name: "generate keepalived: configuration file: keepalived.conf" template: -- 2.39.5