add hosts file
This commit is contained in:
parent
38c1728c04
commit
32d60e44ba
9
hosts.yml
Normal file
9
hosts.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- name: build hosts file
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/hosts
|
||||||
|
insertafter: EOF
|
||||||
|
line: '{{ item }}'
|
||||||
|
state: present
|
||||||
|
with_items:
|
||||||
|
- '{{ ansible_default_ipv4.address }} {{ ansible_hostname }} {{ ansible_fqdn }}'
|
||||||
2
main.yml
2
main.yml
@ -4,7 +4,7 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- include_tasks: assert-vars.yml
|
- include_tasks: assert-vars.yml
|
||||||
# - include_tasks: disable_ipv6.yml
|
# - include_tasks: disable_ipv6.yml
|
||||||
# - include_tasks: hosts.yml
|
- include_tasks: hosts.yml
|
||||||
# - include_tasks: inst_packages.yml
|
# - include_tasks: inst_packages.yml
|
||||||
# - include_tasks: misc.yml
|
# - include_tasks: misc.yml
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user