From acf9375edc8f21439db5b9ae4cce10a92a791bdc Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Mon, 19 Jun 2023 16:34:38 +0000 Subject: [PATCH] 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 --- .../roles/service-ks-register/tasks/main.yml | 18 ++++-------------- ansible/roles/service-rabbitmq/tasks/main.yml | 4 +--- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/ansible/roles/service-ks-register/tasks/main.yml b/ansible/roles/service-ks-register/tasks/main.yml index 069a255f68..056a9fc707 100644 --- a/ansible/roles/service-ks-register/tasks/main.yml +++ b/ansible/roles/service-ks-register/tasks/main.yml @@ -14,9 +14,7 @@ cacert: "{{ service_ks_cacert }}" loop: "{{ service_ks_register_services }}" loop_control: - label: - name: "{{ item.name }}" - service_type: "{{ item.type }}" + label: "{{ item.name }} ({{ item.type }})" register: service_ks_register_result until: service_ks_register_result is success retries: "{{ service_ks_register_retries }}" @@ -40,10 +38,7 @@ - "{{ service_ks_register_services }}" - endpoints loop_control: - label: - service: "{{ item.0.name }}" - url: "{{ item.1.url }}" - interface: "{{ item.1.interface }}" + label: "{{ item.0.name }} -> {{ item.1.url }} -> {{ item.1.interface }}" register: service_ks_register_result until: service_ks_register_result is success retries: "{{ service_ks_register_retries }}" @@ -82,9 +77,7 @@ cacert: "{{ service_ks_cacert }}" with_items: "{{ service_ks_register_users }}" loop_control: - label: - user: "{{ item.user }}" - project: "{{ item.project }}" + label: "{{ item.user }} -> {{ item.project }}" register: service_ks_register_result until: service_ks_register_result is success retries: "{{ service_ks_register_retries }}" @@ -121,10 +114,7 @@ cacert: "{{ service_ks_cacert }}" with_items: "{{ service_ks_register_users + service_ks_register_user_roles }}" loop_control: - label: - user: "{{ item.user }}" - role: "{{ item.role }}" - project: "{{ item.project }}" + label: "{{ item.user }} -> {{ item.project }} -> {{ item.role }}" register: service_ks_register_result until: service_ks_register_result is success retries: "{{ service_ks_register_retries }}" diff --git a/ansible/roles/service-rabbitmq/tasks/main.yml b/ansible/roles/service-rabbitmq/tasks/main.yml index 4bc22e3bd6..74f610a1eb 100644 --- a/ansible/roles/service-rabbitmq/tasks/main.yml +++ b/ansible/roles/service-rabbitmq/tasks/main.yml @@ -30,9 +30,7 @@ user: rabbitmq loop: "{{ service_rabbitmq_users }}" loop_control: - label: - user: "{{ item.user }}" - vhost: "{{ item.vhost }}" + label: "{{ item.user }} -> {{ item.vhost }}" register: service_rabbitmq_result until: service_rabbitmq_result is success retries: "{{ service_rabbitmq_retries }}"