127.0.0.1 localhost {% if network.loopback_in_hosts | default(True) %} 127.0.1.1 {{ inventory_hostname }} {{ short_hostname }} {% else %} {{ "%-15s" | format(ansible_facts['default_ipv4'].address) }} {{ inventory_hostname }} {{ short_hostname }} {% endif %} # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters