# Generiert mit Hilfe von Ansible am {{ ansible_date_time.date }} - diese Datei nicht manuell bearbeiten! # Clientkonfigurationsbeispiel für unterschiedliche Zielsysteme ## statische Konfiguration # localhost Host localhost Hostname 127.0.0.1 IdentityFile ~/.ssh/id_intra # externer Einwahl-Hosts Host example Hostname 93.184.216.34 Port 12345 Protocol 2 ForwardX11 yes ForwardAgent yes IdentityFile ~/.ssh/id_example ## dynamisch aus dem Inventory generierte Konfiguration # interne Systeme - DMZ {% for host in groups['DMZ'] %} Host {{ host }} Hostname {{ hostvars[host]['host_ipv4'] }} User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} Host {{ hostvars[host]['host_alias'] }} Hostname {{ hostvars[host]['host_ipv4'] }} User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} {% endfor %} # interne Systeme - Intranet {% for host in groups['intranet'] %} Host {{ host }} Hostname {{ hostvars[host]['host_ipv4'] }} User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} Host {{ hostvars[host]['host_alias'] }} Hostname {{ hostvars[host]['host_ipv4'] }} User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} {% endfor %} # externe System {% for host in groups['freifunk'] %} Host {{ host }} Hostname [{{ hostvars[host]['host_ipv6'] }}] User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} ProxyCommand ssh -q -W %h:%p {{ hostvars[host]['host_sshjump'] }} Host {{ host }}-extern Hostname {{ hostvars[host]['host_ipv6'] }} User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} {% endfor %} {% for host in groups['raspbian'] %} Host {{ host }} Hostname {{ hostvars[host]['host_ipv4'] }} User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} ProxyCommand ssh -q -W %h:%p {{ hostvars[host]['host_sshjump'] }} Host {{ host }}-intern Hostname {{ hostvars[host]['host_ipv4'] }} User {{ hostvars[host]['ssh_user'] }} Port {{ hostvars[host]['ssh_port'] }} Protocol {{ hostvars[host]['ssh_protocol'] }} IdentityFile {{ hostvars[host]['ssh_keyfile'] }} {% endfor %}