From da459374b283cb4284eb4ea75e47153411e3d01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Fri, 12 Jan 2018 10:41:29 +0100 Subject: [PATCH] localhost line sould not contain hostname information see https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution --- CHANGELOG.md | 1 + README.md | 2 +- defaults/main.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c95557..5c51bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Enhancements * Add example playbook. +* localhost line sould not contain hostname information (see https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution). ## v1.0 diff --git a/README.md b/README.md index 99fb85f..f3dc420 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Manage some basics configuration for IPR's servers. * **basics__domain** : Domain to use [default : `{{ ansible_domain }}`]. * **basics__hosts_localhost_manage** : If the localhost (127.0.0.1) line should be managed [default : `false`]. -* **basics__hosts_localhost_content** : Content of the localhost (127.0.0.1) line [default : `{{ ansible_hostname }}.{{ basics__domain }} {{ ansible_hostname }} localhost.localdomain localhost`]. +* **basics__hosts_localhost_content** : Content of the localhost (127.0.0.1) line [default : `localhost.localdomain localhost`]. * **basics__hosts_ipv4_manage** : If the ipv4 (lan) line should be managed [default : `false`]. * **basics__hosts_ipv4_content** : Content of the ipv4 (lan) line [default : `{{ ansible_hostname }}.{{ basics__domain }} {{ ansible_hostname }}`]. diff --git a/defaults/main.yml b/defaults/main.yml index 5a66a28..b21eae0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,7 +6,7 @@ basics__domain: "{{ ansible_domain }}" # Manage /etc/hosts basics__hosts_localhost_manage: false -basics__hosts_localhost_content: "{{ ansible_hostname }}.{{ basics__domain }} {{ ansible_hostname }} localhost.localdomain localhost" +basics__hosts_localhost_content: "localhost.localdomain localhost" basics__hosts_ipv4_manage: false basics__hosts_ipv4_content: "{{ ansible_hostname }}.{{ basics__domain }} {{ ansible_hostname }}"