diff --git a/tasks/2-scan.yml b/tasks/2-scan.yml index f41ce96255a52592126f72948f78e37a745eccbb..0dd4579c32e6fa0bf2b0a8cf566f940819bd4de3 100644 --- a/tasks/2-scan.yml +++ b/tasks/2-scan.yml @@ -3,9 +3,6 @@ - name: Set SSH tunel command: ssh -o StrictHostKeyChecking=no -f -N -L localhost:9390:scans.cloud.infn.it:9390 jenkins@scans.cloud.infn.it -- debug: - var: paas_ci_test.endpoints_to_scan - - name: Copy scan script copy: src: files/scan.py @@ -38,27 +35,19 @@ debug: var: imported_depdep_log -- name: Show BEFORE paas_ci_test.endpoints_to_scan log +- name: Show paas_ci_test.endpoints_to_scan log debug: var: paas_ci_test.endpoints_to_scan -- name: Fail if "bar" is undefined - set_fact: - paas_ci_test.endpoints_to_scan: "None" +- name: Run scan without endpoints_to_scan variable + command: "{{ paas_ci_workdir + '/scan.py' }} --dep-json {{ paas_ci_workdir + '/dep.json'}} --output-dir {{ paas_ci_workdir }}" + register: scan_output when: paas_ci_test.endpoints_to_scan is undefined -- name: Show AFTER paas_ci_test.endpoints_to_scan log - debug: - var: paas_ci_test.endpoints_to_scan - -- name: Run scan +- name: Run scan with endpoints_to_scan variable command: "{{ paas_ci_workdir + '/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' }}" + when: paas_ci_test.endpoints_to_scan is defined - name: Show scan output debug: