Avoid using loop_var in endpoint manage
When the OSA connection plugin is used on older ansible versions,
and when haproxy runs in a container, a bug exists where the loop_var
fails to properly delegate the task to the haproxy container.
We can avoid using loop_var in the delegation of the task by simply
moving the loop_var up one level so that the endpoint-manage task
file can use {{ item }}.
This was introduced in the commit:
a8a8098394 (diff-db999e390dd84f2a8c2a48b19aa9533f)
Fixes-Bug: #1790779
Change-Id: I17dafb283e41ce05083ae4adb3a325aaca0253dd
This commit is contained in:
parent
cec52b1998
commit
63f5d0e4fa
@ -46,8 +46,10 @@
|
||||
# the load balancer back end for this container.
|
||||
- include: ../common-tasks/haproxy-endpoint-manage.yml
|
||||
vars:
|
||||
haproxy_backend: "{{ item }}-back"
|
||||
haproxy_backend: "{{ backend_name }}-back"
|
||||
haproxy_state: disabled
|
||||
loop_control:
|
||||
loop_var: backend_name
|
||||
when:
|
||||
- "item in group_names"
|
||||
- "groups[item] | length > 1"
|
||||
@ -175,8 +177,10 @@
|
||||
# to available again.
|
||||
- include: ../common-tasks/haproxy-endpoint-manage.yml
|
||||
vars:
|
||||
haproxy_backend: "{{ item }}-back"
|
||||
haproxy_backend: "{{ backend_name }}-back"
|
||||
haproxy_state: enabled
|
||||
loop_control:
|
||||
loop_var: backend_name
|
||||
when:
|
||||
- "item in group_names"
|
||||
- "groups[item] | length > 1"
|
||||
|
@ -24,9 +24,7 @@
|
||||
wait_interval: "{{ haproxy_wait_interval | default(5) }}"
|
||||
wait_retries: "{{ haproxy_wait_retries | default(24) }}"
|
||||
weight: "{{ haproxy_weight | default(omit) }}"
|
||||
delegate_to: "{{ delegate_host }}"
|
||||
delegate_to: "{{ item }}"
|
||||
with_items: "{{ groups['haproxy'] }}"
|
||||
loop_control:
|
||||
loop_var: delegate_host
|
||||
tags:
|
||||
- common-haproxy
|
||||
|
@ -48,9 +48,11 @@
|
||||
# the load balancer back end for this container.
|
||||
- include: common-tasks/haproxy-endpoint-manage.yml
|
||||
vars:
|
||||
haproxy_backend: "{{ item }}"
|
||||
haproxy_backend: "{{ backend_name }}"
|
||||
haproxy_state: disabled
|
||||
when: "groups['keystone_all'] | length > 1"
|
||||
loop_control:
|
||||
loop_var: backend_name
|
||||
with_items:
|
||||
- "keystone_service-back"
|
||||
- "keystone_admin-back"
|
||||
|
Loading…
x
Reference in New Issue
Block a user