aboutsummaryrefslogtreecommitdiffstats
path: root/roles/workstation/templates/ssh.config.j2
blob: 2a3a903bb8ac4b1312089a8e793487b8a7365fbf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# managed by Ansible
{% import 'macros.j2' as macros with context %}

{% call(h) macros.loop_valid_hosts("all") %}
{% set command = "pgrep wg && ! ping -c 1 -w 1 %s" % h.__ip.external %}
Match originalHost {{ h.inventory_hostname }} exec "{{ command }}"
	HostName {{ h.__ip.internal }}
{% if h.ansible_port is defined %}
	Port {{ h.ansible_port }}
{% endif %}
Match originalHost {{ h.inventory_hostname }}
	HostName {{ h.__ip.external }}
{% if h.ansible_port is defined %}
	Port {{ h.ansible_port }}
{% endif %}

{% endcall %}
remember that computers suck.