How can I configure /etc/hosts with ansible orchestration

Indeed this is wierd, since even the docs say :

If, at this point, you haven’t talked to that host yet in any play in the playbook or set of playbooks, you can get at the variables, but you will not be able to see the facts.

I understand from this that you might not get gathered facts if host hasn't been "queried" yet, but you still should see variables defined in inventory (and group/host vars). May be you should push that to the mailing list.

In the mean time, you can solve your problem using groups['all'] to loop over your hosts instead :

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

{% for item in groups['all'] %}
{{ hostvars[item]['ansible_ssh_host'] }} {{ item }}
{% endfor %}