ansible_host={{ inventory_hostname }}.{{ host_domain }}
ansible_user=root
+[net-zone-mgmt]
+#torwaechter
+alfred
+calendar
+galley
+hacksch
+## TODO: remove the variable once https://github.com/ansible/ansible/issues/39119 is fixed
+metrics localconfig_ssh_config_user=root
+r3home
+tickets
+
+[net-zone-mgmt:vars]
+host_domain=mgmt.realraum.at
+
+##########################
+
[baremetalservers]
-alfred.mgmt
+alfred
[kvmhosts]
-alfred.mgmt
+alfred
[virtualservers]
athsdisc
-calendar.mgmt
+calendar
ctf
entrance
-galley.mgmt
-hacksch.mgmt
-## TODO: remove the variable once https://github.com/ansible/ansible/issues/39119 is fixed
-metrics.mgmt localconfig_ssh_config_user=root
-r3home.mgmt
-tickets.mgmt
+galley
+hacksch
+metrics
+r3home
+tickets
vex
[servers:children]
#[alix]
#gw
-#torwaechter.mgmt
+#torwaechter
#[apu]
#gnocchi1
# realraum ssh-config (generated by ansible NOC repo)
#######################################
-### dynamically generated hosts
+### dynamically generated host configs
{% for host in (groups['all'] | sort) %}
-{% set shortname = (host.split('.') | first) %}
-Host {{ host }}.realraum.at r3-{{ shortname }} r3g-{{ shortname }} r3e-{{ shortname }}
- Hostname {{ host }}.realraum.at
+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 %}