From e0bb477707778b3b1f9dba2b022bfd069b85c9ce Mon Sep 17 00:00:00 2001
From: "gioacchino.vino" <gioacchino.vino@infn.it>
Date: Fri, 29 Sep 2023 15:27:14 +0200
Subject: [PATCH] show scans logs

---
 tasks/2-scan.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tasks/2-scan.yml b/tasks/2-scan.yml
index 4a51742..c901f91 100644
--- a/tasks/2-scan.yml
+++ b/tasks/2-scan.yml
@@ -38,10 +38,12 @@
 - name: Load scans log
   command: cat "{{ paas_ci_workdir + '/scans.log'}}"
   register: scans_log
+  when: summary_report_json.global == 'NOK'
 
 - name: Show scans log
   debug:
     msg: "{{ scans_log.output }}"
+    when: summary_report_json.global == 'NOK'
 
 - name: Detailed report summary
   debug:
-- 
GitLab