소스 검색

Add localhost.localdomain FQDN for 127.0.0.1 for hosts file

Emmanuel Bouthenot 11 년 전
부모
커밋
cf40eca524
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      roles/common/templates/hosts.j2

+ 5 - 5
roles/common/templates/hosts.j2

@@ -3,12 +3,12 @@
 {{ prolog() }}
 {% endif -%}
 
-127.0.0.1       localhost
-{% if ansible_default_ipv4 is defined %}
-{{ ansible_default_ipv4.address }}  {{ ansible_fqdn }}  {{ ansible_hostname }}
+127.0.0.1 localhost.localdomain localhost
+{% if ansible_default_ipv4.address is defined %}
+{{ ansible_default_ipv4.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
 {% endif %}
-{% if ansible_default_ipv6 is defined %}
-{{ ansible_default_ipv6.address }}  {{ ansible_fqdn }}  {{ ansible_hostname }}
+{% if ansible_default_ipv6.address is defined %}
+{{ ansible_default_ipv6.address }} {{ ansible_fqdn }} {{ ansible_hostname }}
 {% endif %}
 
 # The following lines are desirable for IPv6 capable hosts