You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

10 line
497B

  1. {% for hostname in groups.all %}
  2. Host {{hostname}}
  3. {% if ssh_over_tor and ('ansible_local' in hostvars[hostname]) and ('tor' in hostvars[hostname].ansible_local) and ('ssh' in hostvars[hostname].ansible_local.tor.tor_hidden_services_hostnames) %}
  4. HostName {{hostvars[hostname].ansible_local.tor.tor_hidden_services_hostnames.ssh}}
  5. ProxyCommand nc -x 127.0.0.1:9050 -X5 %h %p
  6. {% elif 'external_ip' in hostvars[hostname] %}
  7. HostName {{hostvars[hostname].external_ip}}
  8. {% endif %}
  9. {% endfor %}