1 ##########################################################################################
2 # realraum ssh-config (generated by ansible NOC repo)
4 #######################################
5 ### dynamically generated host configs
7 {% for host in (groups['all'] | sort) %}
8 Host {{ hostvars[host].ansible_host }} r3-{{ host }} r3g-{{ host }} r3e-{{ host }}
9 Hostname {{ hostvars[host].ansible_host }}
10 {% if 'localconfig_ssh_config_proxycommand' in hostvars[host] %}
11 ProxyCommand {{ hostvars[host].localconfig_ssh_config_proxycommand }}
13 {% if 'localconfig_ssh_config_user' in hostvars[host] %}
14 User {{ hostvars[host].localconfig_ssh_config_user }}
16 {% if hostvars[host].ansible_port != 22000 %}
17 Port {{ hostvars[host].ansible_port }}
21 #######################################
22 ### static host configs
24 Host gw.realraum.at r3-gw
25 Hostname gw.realraum.at
27 Host licht.realraum.at r3-licht r3g-licht r3e-licht
28 Hostname licht.realraum.at
32 #############################################################
34 ### general settings, this must come after the last host entry!!!
37 ## use gateway as jump host
39 # ProxyCommand ssh -q -a gw.realraum.at -W %h:%p
40 ProxyCommand ssh -q -a gw.realraum.at nc -q0 -w1 %h %p
42 ## use entrance as jump host
44 ProxyCommand ssh -q -a entrance.realraum.at -W %h:%p
46 Host r3-* r3g-* r3e-* *.realraum.at
47 {% for id_file in localconfig_ssh_ids %}
48 IdentityFile {{ id_file }}
53 {% if localconfig_ssh_user is defined %}
54 User {{ localconfig_ssh_user }}
58 ### don't put anything beyond this line!