From 0d0c5df9491f8b4bab8178f6a148e31d8b661695 Mon Sep 17 00:00:00 2001 From: MallocArray Date: Mon, 16 Dec 2024 08:58:41 -0600 Subject: [PATCH] Shorten label on some loops to show name instead of entire json block (#1002) * Fix loop label in controller_execution_environments * Shorten label of job template async status The current label of the step to wait for the async job templates to complete shows the full JSON output of the job var, which is very verbose and can be especially long when a survey is included. Shorten the output so it only shows the name of the job template, very similar to the task that manages controller job templates * Loop labels to name of object * Add changelog fragments --------- Co-authored-by: Sean Sullivan --- changelogs/fragments/controller_credential_types.yml | 3 +++ changelogs/fragments/controller_job_templates.yml | 3 +++ changelogs/fragments/controller_workflow_job_templates.yml | 3 +++ roles/controller_credential_types/tasks/main.yml | 2 +- roles/controller_job_templates/tasks/main.yml | 2 +- roles/controller_workflow_job_templates/tasks/main.yml | 1 + 6 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/controller_credential_types.yml create mode 100644 changelogs/fragments/controller_job_templates.yml create mode 100644 changelogs/fragments/controller_workflow_job_templates.yml diff --git a/changelogs/fragments/controller_credential_types.yml b/changelogs/fragments/controller_credential_types.yml new file mode 100644 index 000000000..ca6235926 --- /dev/null +++ b/changelogs/fragments/controller_credential_types.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - Update loop label to only show name of credential type instead of entire json object diff --git a/changelogs/fragments/controller_job_templates.yml b/changelogs/fragments/controller_job_templates.yml new file mode 100644 index 000000000..d4249842b --- /dev/null +++ b/changelogs/fragments/controller_job_templates.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - Update loop label to only show name of job template instead of entire json object diff --git a/changelogs/fragments/controller_workflow_job_templates.yml b/changelogs/fragments/controller_workflow_job_templates.yml new file mode 100644 index 000000000..4ea69bbb5 --- /dev/null +++ b/changelogs/fragments/controller_workflow_job_templates.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - Update loop label to only show name of workflow job template instead of entire json object diff --git a/roles/controller_credential_types/tasks/main.yml b/roles/controller_credential_types/tasks/main.yml index d8c042ec0..e668e285d 100644 --- a/roles/controller_credential_types/tasks/main.yml +++ b/roles/controller_credential_types/tasks/main.yml @@ -45,7 +45,7 @@ loop: "{{ __credentialtypes_job_async.results }}" loop_control: loop_var: __credentialtypes_job_async_result_item - label: "{{ __operation.verb }} Controller Credential Type {{ __credentialtypes_job_async_result_item }} | Wait for finish the credential type {{ __operation.action }}" + label: "{{ __operation.verb }} Controller Credential Type {{ __credentialtypes_job_async_result_item.__controller_credential_type_item.name }} | Wait for finish the credential type {{ __operation.action }}" when: not ansible_check_mode and __credentialtypes_job_async_result_item.ansible_job_id is defined no_log: "{{ controller_configuration_credential_types_secure_logging }}" vars: diff --git a/roles/controller_job_templates/tasks/main.yml b/roles/controller_job_templates/tasks/main.yml index 3e2768017..61c41bae3 100644 --- a/roles/controller_job_templates/tasks/main.yml +++ b/roles/controller_job_templates/tasks/main.yml @@ -93,7 +93,7 @@ loop: "{{ __job_templates_job_async.results }}" loop_control: loop_var: __job_templates_job_async_result_item - label: "{{ __operation.verb }} Job Template {{ __job_templates_job_async_result_item }} | Wait for finish the Job Template {{ __operation.action }}" + label: "{{ __operation.verb }} Job Template {{ __job_templates_job_async_result_item.__controller_template_item.name }} | Wait for finish the Job Template {{ __operation.action }}" when: not ansible_check_mode and __job_templates_job_async_result_item.ansible_job_id is defined no_log: "{{ controller_configuration_job_templates_secure_logging }}" vars: diff --git a/roles/controller_workflow_job_templates/tasks/main.yml b/roles/controller_workflow_job_templates/tasks/main.yml index 5c9e14569..1c90997d4 100644 --- a/roles/controller_workflow_job_templates/tasks/main.yml +++ b/roles/controller_workflow_job_templates/tasks/main.yml @@ -81,6 +81,7 @@ loop: "{{ controller_workflows | default(workflow_job_templates) }}" loop_control: loop_var: __workflow_loop_item + label: "Workflow {{ __workflow_loop_item.name }}" when: - __workflow_loop_item.simplified_workflow_nodes is defined - (__workflow_loop_item.state | default('present')) == "present"