diff --git a/tasks/2-scan.yml b/tasks/2-scan.yml
index a6fcb7ad826ca7e51265ccd1390799c54052101a..287c99f5127f6a6b3411f8a86dc4195d27f98b0f 100644
--- a/tasks/2-scan.yml
+++ b/tasks/2-scan.yml
@@ -6,7 +6,7 @@
     var: ansible_default_ipv4.address
 
 - name: Set SSH tunnel
-  command: ssh -f -N -L "{{ ansible_default_ipv4.address }}":9390:192.168.187.162:9390 jenkins@scans.cloud.infn.it 
+  command: ssh -f -N -L `hostname -I | awk '{print $1}'`":9390:192.168.187.162:9390 jenkins@scans.cloud.infn.it 
 
 - set_fact:
     endpoints_to_scan: "{{ paas_ci_test.endpoints_to_scan }}"