1 ##########################################################################################
2 # realraum ssh-config (generated by ansible NOC repo)
4 #######################################
5 ### dynamically generated hosts
7 {% for host in (groups['all'] | sort) %}
8 {% set shortname = (host.split('.') | first) %}
9 Host {{ host }}.realraum.at r3-{{ shortname }} r3g-{{ shortname }} r3e-{{ shortname }}
10 Hostname {{ host }}.realraum.at
11 {% if 'localconfig_ssh_config_proxycommand' in hostvars[host] %}
12 ProxyCommand {{ hostvars[host].localconfig_ssh_config_proxycommand }}
14 {% if 'localconfig_ssh_config_user' in hostvars[host] %}
15 User {{ hostvars[host].localconfig_ssh_config_user }}
17 {% if 'localconfig_ssh_config_port' in hostvars[host] %}
18 Port {{ hostvars[host].localconfig_ssh_config_port }}
22 #######################################
23 ### static host configs
25 Host gw.realraum.at r3-gw
26 Hostname gw.realraum.at
28 Host gnocchi1.realraum.at r3-gnocchi1
29 Hostname gnocchi1.realraum.at
31 Host gnocchi2.realraum.at r3-gnocchi2
32 Hostname gnocchi2.realraum.at
34 Host torwaechter.mgmt.realraum.at r3g-torwaechter
35 Hostname torwaechter.mgmt.realraum.at
38 Host ap0.mgmt.realraum.at r3g-ap0
39 Hostname ap0.mgmt.realraum.at
42 Host ap1.mgmt.realraum.at r3g-ap1
43 Hostname ap1.mgmt.realraum.at
46 Host licht.realraum.at r3-licht r3g-licht r3e-licht
47 Hostname licht.realraum.at
51 #############################################################
53 ### general settings, this must come after the last host entry!!!
56 ## use gateway as jump host
58 # ProxyCommand ssh -q -a gw.realraum.at -W %h:%p
59 ProxyCommand ssh -q -a gw.realraum.at nc -q0 -w1 %h %p
61 ## use entrance as jump host
63 ProxyCommand ssh -q -a entrance.realraum.at -W %h:%p
65 Host r3-* r3g-* r3e-* *.realraum.at
66 {% for id_file in localconfig_ssh_ids %}
67 IdentityFile {{ id_file }}
72 {% if localconfig_ssh_user is defined %}
73 User {{ localconfig_ssh_user }}
77 ### don't put anything beyond this line!