generate etc/hosts
This commit is contained in:
parent
125d61f433
commit
1724ab2bea
@ -1,4 +1,6 @@
|
|||||||
- name: resolv.conf
|
- name: resolv.conf
|
||||||
copy: src=resolv.conf dest=/etc/resolv.conf mode=0644
|
copy: src=resolv.conf dest=/etc/resolv.conf mode=0644 backup=yes
|
||||||
- name: locale.conf
|
- name: locale.conf
|
||||||
copy: src=locale.conf dest=/etc/locale.conf mode=0644
|
copy: src=locale.conf dest=/etc/locale.conf mode=0644 backup=yes
|
||||||
|
- name: /etc/hosts
|
||||||
|
template: src=hosts.j2 dest=/etc/hosts mode=0644 backup=yes
|
||||||
|
10
roles/common/templates/hosts.j2
Normal file
10
roles/common/templates/hosts.j2
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# THIS FILE IS MANAGED BY ANSIBLE, DO NOT EDIT MANUALLY
|
||||||
|
#
|
||||||
|
# /etc/hosts: static lookup table for host names
|
||||||
|
#
|
||||||
|
|
||||||
|
#<ip-address> <hostname.domain.org> <hostname>
|
||||||
|
127.0.0.1 {{ ansible_nodename }}.lxc {{ ansible_nodename }} localhost
|
||||||
|
::1 {{ ansible_nodename }}.lxc {{ ansible_nodename }} localhost
|
||||||
|
|
||||||
|
# End of file
|
Loading…
Reference in New Issue
Block a user