Browse Source

added ssh_proxy option

Fabian Peter Hammerle 7 years ago
parent
commit
ab8b95ffba
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tasks/main.yml

+ 4 - 1
tasks/main.yml

@@ -6,7 +6,10 @@
       {% set host_config = ssh_config_hosts[host] %}
       Host {{host}}
       {% if host_config.hostname is defined %}
-          HostName {{host_config.hostname}} 
+          HostName {{host_config.hostname}}
+      {% endif %}
+      {% if host_config.ssh_proxy is defined %}
+          ProxyCommand ssh -W localhost:{{host_config.ssh_proxy.port}} {{host_config.ssh_proxy.host}}
       {% endif %}
       {% endfor %}
   become: yes