forked from AFPy/infra
Configure /etc/hosts as expected by Debian.
cf. https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution
This commit is contained in:
parent
861af29c7d
commit
47452f07f2
|
@ -5,11 +5,20 @@
|
|||
hostname:
|
||||
name: "{{ inventory_hostname_short }}"
|
||||
|
||||
- name: Configure FQDN
|
||||
- name: Configure localhots
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^127\.0\.0\.1'
|
||||
line: "127.0.0.1 {{ inventory_hostname }} {{ inventory_hostname_short }} localhost"
|
||||
line: "127.0.0.1 localhost"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Configure FQDN
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^127\.0\.1\.1'
|
||||
line: "127.0.1.1 {{ inventory_hostname }} {{ inventory_hostname_short }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
|
Loading…
Reference in New Issue
Block a user