add toggle variable ansible fire failure to awx function 88/116088/1
authorEltanany Shaaban <shaaban.eltanany.ext@orange.com>
Thu, 3 Dec 2020 17:56:05 +0000 (19:56 +0200)
committerEltanany Shaaban <shaaban.eltanany.ext@orange.com>
Thu, 3 Dec 2020 17:56:05 +0000 (19:56 +0200)
-add logs output when it fails

Issue-ID: CCSDK-2366

Signed-off-by: Eltanany Shaaban <shaaban.eltanany.ext@orange.com>
Change-Id: Ie1a122865be541a45de157ab3afa9e426d1defb4

ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt

index dccbe2e..133e4a5 100644 (file)
@@ -228,9 +228,9 @@ open class ComponentRemoteAnsibleExecutor(
                 val message = "Execution of job template $job_template_name failed for requestId $processId." + " (Response: ${response.body}) "
                 log.error(message)
                 setNodeOutputErrors(ATTRIBUTE_EXEC_CMD_STATUS_ERROR, message)
-            } else {
-                populateJobRunResponse(awxClient, jobId, workflowPrefix, jobStatus)
             }
+
+            populateJobRunResponse(awxClient, jobId, workflowPrefix, jobStatus)
         } else {
             // The job template requirements were not fulfilled with the values passed in. The message below will
             // provide more information via the response, like the ignored_fields, or variables_needed_to_start,