]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rgwloadbalancer undefined index variable
authorAnsible Deployment User <ansible@ceph-adm.intra.uibk.ac.at>
Tue, 26 May 2020 11:18:03 +0000 (13:18 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 26 May 2020 14:03:25 +0000 (10:03 -0400)
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 <florian.faltermeier@uibk.ac.at>
roles/ceph-rgw-loadbalancer/tasks/pre_requisite.yml

index 2772e41af7aa4f8a3977279821e97214f13b709f..0a5ffd1ebc621b8472ebaed0bdce0faf919ff88f 100644 (file)
 
 - 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: