diff --git a/files/scan.py b/files/scan.py
index ae3744a3abdd2a20e241f092845f09026b547b0a..a032a8f36ab15f3ddbfc6bb86d10c8759491c5b8 100644
--- a/files/scan.py
+++ b/files/scan.py
@@ -16,7 +16,8 @@ parser = argparse.ArgumentParser(
             
 parser.add_argument(
     "--endpoint-keys",
-    help="Orchestrator output endpoints to scan (endpoints1,endpoints2)"
+    help="Orchestrator output endpoints to scan (endpoints1,endpoints2)",
+    default="None"
     )
 parser.add_argument(
     "--dep-json", 
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: