########################################################################################## # realraum ssh-config (generated by ansible NOC repo) ####################################### ### dynamically generated host configs {% for host in (groups['all'] | sort) %} Host {{ hostvars[host].ansible_host }} r3-{{ host }} r3g-{{ host }} r3e-{{ host }} Hostname {{ hostvars[host].ansible_host }} {% if 'localconfig_ssh_config_proxycommand' in hostvars[host] %} ProxyCommand {{ hostvars[host].localconfig_ssh_config_proxycommand }} {% endif %} {% if 'localconfig_ssh_config_user' in hostvars[host] %} User {{ hostvars[host].localconfig_ssh_config_user }} {% endif %} {% if hostvars[host].ansible_port != 22000 %} Port {{ hostvars[host].ansible_port }} {% endif %} {% endfor %} ####################################### ### static host configs Host gw.realraum.at r3-gw Hostname gw.realraum.at Host ap0.mgmt.realraum.at r3g-ap0 Hostname ap0.mgmt.realraum.at User root Host ap1.mgmt.realraum.at r3g-ap1 Hostname ap1.mgmt.realraum.at User root Host ap2.mgmt.realraum.at r3g-ap2 Hostname ap2.mgmt.realraum.at User root Host licht.realraum.at r3-licht r3g-licht r3e-licht Hostname licht.realraum.at User realraum ############################################################# ### ### general settings, this must come after the last host entry!!! ### ## use gateway as jump host Host r3g-* # ProxyCommand ssh -q -a gw.realraum.at -W %h:%p ProxyCommand ssh -q -a gw.realraum.at nc -q0 -w1 %h %p ## use entrance as jump host Host r3e-* ProxyCommand ssh -q -a entrance.realraum.at -W %h:%p Host r3-* r3g-* r3e-* *.realraum.at {% for id_file in localconfig_ssh_ids %} IdentityFile {{ id_file }} {% endfor %} IdentitiesOnly yes ForwardAgent no Port 22000 {% if localconfig_ssh_user is defined %} User {{ localconfig_ssh_user }} {% endif %} ### ### don't put anything beyond this line!