From b52a6bc43a3f0c1776a7bd479a78e63f90735947 Mon Sep 17 00:00:00 2001 From: Gurenko Alex Date: Fri, 22 Nov 2024 15:07:58 +0100 Subject: [PATCH] Update kernel side load job status check --- roles/sideload_kernel/tasks/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/sideload_kernel/tasks/main.yml b/roles/sideload_kernel/tasks/main.yml index 8bab1abe2..55ce9f750 100644 --- a/roles/sideload_kernel/tasks/main.yml +++ b/roles/sideload_kernel/tasks/main.yml @@ -107,7 +107,9 @@ delay: 15 - name: Ensure the job completed successfully + vars: + query_complete: "status.conditions[?type=='Complete'].status" ansible.builtin.fail: - msg: "Job state is {{ job_state.resources[0].status.conditions[0].type }}" - when: job_state.resources[0].status.conditions[0].type != 'Complete' + msg: "Job state is {{ job_state.resources[0] | community.general.json_query(query_complete) }}" + when: "'True' not in job_state.resources[0] | community.general.json_query(query_complete)" ...