diff --git a/tasks/2-scan.yml b/tasks/2-scan.yml
index 287c99f5127f6a6b3411f8a86dc4195d27f98b0f..804401fc0f935e59d87b3a10c58efbb302ef89e6 100644
--- a/tasks/2-scan.yml
+++ b/tasks/2-scan.yml
@@ -1,12 +1,16 @@
-- name: Print all available facts
-  ansible.builtin.debug:
-    var: ansible_facts
-    
+- name: Set Local IP cmd
+  set_fact:
+    local_ip_cmd: "hostname -I | awk '{print $1}'"
+
+- name:  Get Local IP
+  command: "{{ local_ip_cmd }}"
+  register: local_ip
+
 - debug: 
-    var: ansible_default_ipv4.address
+    var: local_ip
 
 - name: Set SSH tunnel
-  command: ssh -f -N -L `hostname -I | awk '{print $1}'`":9390:192.168.187.162:9390 jenkins@scans.cloud.infn.it 
+  command: ssh -f -N -L {{ local_ip }}:9390:192.168.187.162:9390 jenkins@scans.cloud.infn.it 
 
 - set_fact:
     endpoints_to_scan: "{{ paas_ci_test.endpoints_to_scan }}"