From 48f93deb4bea0d38eadde154e72bd41b80155571 Mon Sep 17 00:00:00 2001 From: "gioacchino.vino" <gioacchino.vino@infn.it> Date: Wed, 6 Dec 2023 10:34:32 +0100 Subject: [PATCH] Increase log level --- files/scan.py | 2 +- tasks/2-scan.yml | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/files/scan.py b/files/scan.py index 36394a5..e3f1f10 100644 --- a/files/scan.py +++ b/files/scan.py @@ -30,7 +30,7 @@ parser.add_argument( args = parser.parse_args() logging.basicConfig( - filename='scans.log', + filename='scan.log', level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', diff --git a/tasks/2-scan.yml b/tasks/2-scan.yml index 1b1628c..585ee0d 100644 --- a/tasks/2-scan.yml +++ b/tasks/2-scan.yml @@ -23,13 +23,23 @@ - name: Adding execution permission to scan script file: - dest: "{{ paas_ci_scan_script_path }}/scan.py" + dest: "{{ paas_ci_scan_script_path + '/scan.py' }} " mode: a+x +- name: Show dep json file + debug: + msg: "{{lookup('file', item.path)}}" + with_items: "{{ paas_ci_workdir + '/dep.json'}}" + - name: Run scan command: "{{ paas_ci_scan_script_path }}/scan.py --endpoint-keys {{ paas_ci_test.endpoints_to_scan }} --dep-json {{ paas_ci_workdir + '/dep.json'}} --output-dir {{ paas_ci_workdir }}" register: scan_output +- name: Scan logs + debug: + msg: "{{lookup('file', item.path)}}" + with_items: "{{ paas_ci_workdir + 'scan.log' }}" + - name: Show scan output debug: msg: "{{ scan_output }}" -- GitLab