From d0a419a9d48c746e57886f9d9cbdbf1d8a3dba68 Mon Sep 17 00:00:00 2001 From: rhalle Date: Mon, 27 May 2024 14:43:09 +0300 Subject: [PATCH] Remove curly braces from item and change to loop range --- roles/node_prep/tasks/10_validation.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/node_prep/tasks/10_validation.yml b/roles/node_prep/tasks/10_validation.yml index cb70d7d54..c1728e7d8 100644 --- a/roles/node_prep/tasks/10_validation.yml +++ b/roles/node_prep/tasks/10_validation.yml @@ -486,12 +486,12 @@ add_host: groups: dell_hosts_redfish hostname: "{{ chassis_result.results[item|int].item }}" - with_sequence: start=0 end="{{ numworkers|int + nummasters|int - 1 }}" + loop: "{{ range(0, numworkers|int + nummasters|int, 1)|list }}" when: - - not chassis_result.results[{{ item }}].failed|bool - - not firmware_result.results[{{ item }}].failed|bool - - "'Dell' in chassis_result.results[{{ item }}].redfish_facts.chassis.entries[0].Manufacturer" - - firmware_result.results[{{ item }}].redfish_facts.firmware.entries | json_query(query) | max >= "4.20.20.20" + - not chassis_result.results[item].failed|bool + - not firmware_result.results[item].failed|bool + - "'Dell' in chassis_result.results[item].redfish_facts.chassis.entries[0].Manufacturer" + - firmware_result.results[item].redfish_facts.firmware.entries | json_query(query) | max >= "4.20.20.20" vars: query: "[?Name=='Integrated Dell Remote Access Controller'].Version" register: dell_host_redfish_result @@ -509,11 +509,11 @@ add_host: groups: hp_hosts_redfish hostname: "{{ chassis_result.results[item|int].item }}" - with_sequence: start=0 end="{{ numworkers|int + nummasters|int - 1 }}" + loop: "{{ range(0, numworkers|int + nummasters|int, 1)|list }}" when: - - not chassis_result.results[{{ item }}].failed|bool - - not firmware_result.results[{{ item }}].failed|bool - - "'HPE' in chassis_result.results[{{ item }}].redfish_facts.chassis.entries[0].Manufacturer" + - not chassis_result.results[item].failed|bool + - not firmware_result.results[item].failed|bool + - "'HPE' in chassis_result.results[item].redfish_facts.chassis.entries[0].Manufacturer" register: hp_host_redfish_result retries: 6 # 1 minute (10 * 6) delay: 10 # Every 10 seconds