# Archivo /etc/hosts generado por Ansible # Contenido actual del archivo /etc/hosts {{ current_hosts_content }} # Información de todos los hosts del inventario {% for host in groups['computers'] %} {{ hostvars[host]['ansible_facts']['enp0s8']['ipv4']['address'] }} {{ hostvars[host]['ansible_hostname'] }} {{ host }} {{ hostvars[host]['ansible_fqdn'] | default('') }} {% endfor %}