diff --git a/files/script.py b/files/script.py index a4b4993a6468ab101111569017048a1ef8b94748..76eebb9cbc2e76f5dfd44878ce190fe6773a2fae 100644 --- a/files/script.py +++ b/files/script.py @@ -43,6 +43,7 @@ def create_port_list(port_list_name, ports): status_text = res.xpath('@status_text')[0] if status == "201": id = res.xpath('@id')[0] + logging.debug(f'Created port list obj. Name: {port_list_name}, id: {id}, ports: {ports}') return {'name': port_list_name, 'id': id} else: logging.error(f"ERROR during Port list creation. Status code: {status}, msg: {status_text}") @@ -423,7 +424,7 @@ def import_dep_info(file_path, endpoints_to_scan): ################ MAIN ####################################### logging.basicConfig( - filename='debug.log', + filename='scans.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 2b59d72b957cee635c6e9d1b240fb087d0a25b39..4a51742a6a2fe673fdcfaa483cd03835782807f4 100644 --- a/tasks/2-scan.yml +++ b/tasks/2-scan.yml @@ -35,6 +35,14 @@ with_items: "{{report_files.files}}" when: summary_report_json.global == 'NOK' +- name: Load scans log + command: cat "{{ paas_ci_workdir + '/scans.log'}}" + register: scans_log + +- name: Show scans log + debug: + msg: "{{ scans_log.output }}" + - name: Detailed report summary debug: var: summary_report_json