{% for host in groups['cloud_aws']|sort %}
define host {
   use                     aws
   host_name               {{ host }}
{% if hostvars[host].ansible_hostname is defined %}
   alias                   {{ hostvars[host].ansible_hostname }}
{% else %}
   alias                   {{ host }}
{% endif %}
   address                 {{ host }}
}
{% endfor %}
