install-raspberry/hosts.yml
2024-05-22 17:28:03 +02:00

9 lines
259 B
YAML

---
- name: build hosts file
lineinfile:
dest: /etc/hosts
insertafter: EOF
line: '{{ item }}'
state: present
with_items:
- line: '{{ ansible_eth0.ipv4.address }} {{ inventory_hostname }} {{ inventory_hostname }}.{{ ansible_domain }}'