Merge "Avoid using loop_var in endpoint manage"

This commit is contained in:
Zuul
2018-09-19 03:17:37 +00:00
committed by Gerrit Code Review
3 changed files with 10 additions and 6 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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"