Fix loop label syntax error with ansible-core 2.15

Labels are supposed to be strings, but prior to
https://github.com/ansible/ansible/pull/80040 Ansible
did not enforce this.

Change-Id: Iefad160be12f1b5e689a74a82714857fa867d69a
Signed-off-by: Paul Arthur <paul.arthur@flowerysong.com>
This commit is contained in:
Paul Arthur 2023-06-19 16:34:38 +00:00 committed by Michal Nasiadka
parent af2ccd1572
commit acf9375edc
2 changed files with 5 additions and 17 deletions

View File

@ -14,9 +14,7 @@
cacert: "{{ service_ks_cacert }}" cacert: "{{ service_ks_cacert }}"
loop: "{{ service_ks_register_services }}" loop: "{{ service_ks_register_services }}"
loop_control: loop_control:
label: label: "{{ item.name }} ({{ item.type }})"
name: "{{ item.name }}"
service_type: "{{ item.type }}"
register: service_ks_register_result register: service_ks_register_result
until: service_ks_register_result is success until: service_ks_register_result is success
retries: "{{ service_ks_register_retries }}" retries: "{{ service_ks_register_retries }}"
@ -40,10 +38,7 @@
- "{{ service_ks_register_services }}" - "{{ service_ks_register_services }}"
- endpoints - endpoints
loop_control: loop_control:
label: label: "{{ item.0.name }} -> {{ item.1.url }} -> {{ item.1.interface }}"
service: "{{ item.0.name }}"
url: "{{ item.1.url }}"
interface: "{{ item.1.interface }}"
register: service_ks_register_result register: service_ks_register_result
until: service_ks_register_result is success until: service_ks_register_result is success
retries: "{{ service_ks_register_retries }}" retries: "{{ service_ks_register_retries }}"
@ -82,9 +77,7 @@
cacert: "{{ service_ks_cacert }}" cacert: "{{ service_ks_cacert }}"
with_items: "{{ service_ks_register_users }}" with_items: "{{ service_ks_register_users }}"
loop_control: loop_control:
label: label: "{{ item.user }} -> {{ item.project }}"
user: "{{ item.user }}"
project: "{{ item.project }}"
register: service_ks_register_result register: service_ks_register_result
until: service_ks_register_result is success until: service_ks_register_result is success
retries: "{{ service_ks_register_retries }}" retries: "{{ service_ks_register_retries }}"
@ -121,10 +114,7 @@
cacert: "{{ service_ks_cacert }}" cacert: "{{ service_ks_cacert }}"
with_items: "{{ service_ks_register_users + service_ks_register_user_roles }}" with_items: "{{ service_ks_register_users + service_ks_register_user_roles }}"
loop_control: loop_control:
label: label: "{{ item.user }} -> {{ item.project }} -> {{ item.role }}"
user: "{{ item.user }}"
role: "{{ item.role }}"
project: "{{ item.project }}"
register: service_ks_register_result register: service_ks_register_result
until: service_ks_register_result is success until: service_ks_register_result is success
retries: "{{ service_ks_register_retries }}" retries: "{{ service_ks_register_retries }}"

View File

@ -30,9 +30,7 @@
user: rabbitmq user: rabbitmq
loop: "{{ service_rabbitmq_users }}" loop: "{{ service_rabbitmq_users }}"
loop_control: loop_control:
label: label: "{{ item.user }} -> {{ item.vhost }}"
user: "{{ item.user }}"
vhost: "{{ item.vhost }}"
register: service_rabbitmq_result register: service_rabbitmq_result
until: service_rabbitmq_result is success until: service_rabbitmq_result is success
retries: "{{ service_rabbitmq_retries }}" retries: "{{ service_rabbitmq_retries }}"